Examples of removeFirstSegments()


Examples of org.eclipse.core.runtime.Path.removeFirstSegments()

  private boolean containsPublishedFiles(IStorage dir, IDesignerUser user, String timeStamp){
    for(Version version : user.getVersions()){
      if(!version.getTime().equals(timeStamp)) continue;
      for(String res : version.resources){
        IPath resPath = new Path(res);
        while(resPath.segment(0).equals(".")) resPath = resPath.removeFirstSegments(1);
        if(dir.getName().equals(resPath.segment(0))){
          return true;
        }
      }
    }
View Full Code Here

Examples of org.eclipse.core.runtime.Path.removeFirstSegments()

              if (files[i] == null) {
                  continue;
              }
              IPath myPath = new Path(this.resourcePointer.getPath());
              IPath itemPath = new Path(files[i].getPath());
              IPath newPath = itemPath.removeFirstSegments(myPath.matchingFirstSegments(itemPath));
              IVResource item = null;
             
              String[] pathSplit = newPath.segments();
             
              IVResource parent = this;
View Full Code Here

Examples of org.eclipse.core.runtime.Path.removeFirstSegments()

        // Path(virtualRoot).matchingFirstSegments(p1));
        URL[] files = this.library.find(p1.append(childName).toString(), false, this.sourceElement);
        for (int i = 0; i < files.length; i++) {
            IPath myPath = new Path(this.resourcePointer.getPath());
            IPath itemPath = new Path(files[i].getPath());
            IPath newPath = itemPath.removeFirstSegments(myPath.matchingFirstSegments(itemPath));
            IVResource item = new VLibraryResource(this.library, files[i],  newPath.removeTrailingSeparator().toString(), new Path(this.bundleRoot)
                    .append(newPath).toString());

            item.setParent(this);
            if (item != null) {
View Full Code Here

Examples of org.eclipse.core.runtime.Path.removeFirstSegments()

      return new ILibInfo[0];
   
    String version = dojoProps.getProperty("dojo-version-attribute-name");
    String path = dojoProps.getProperty("dojo-root");
    IPath fullPath = new Path(path);
    String simplePath = fullPath.removeFirstSegments(1).toString();
   
    for(int i=0;i<simpleVersion.length;i++){
      if(version.indexOf(simpleVersion[i]) > -1){
        version = simpleVersion[i];
        break;
View Full Code Here

Examples of org.eclipse.core.runtime.Path.removeFirstSegments()

      return url;
    }
    IUser user = null;
    IPath ipath = new Path(path);
    if (ipath.segment(0).equals(contextPathSegment)) {
       ipath = ipath.removeFirstSegments(1);
    }
    if (ipath.segment(0).equals("maqetta")) {
      if (ipath.segment(1).equals("user")) {
         ipath = ipath.removeFirstSegments(2);
        String userName = ipath.segment(0);
View Full Code Here

Examples of org.eclipse.core.runtime.Path.removeFirstSegments()

    if (ipath.segment(0).equals(contextPathSegment)) {
       ipath = ipath.removeFirstSegments(1);
    }
    if (ipath.segment(0).equals("maqetta")) {
      if (ipath.segment(1).equals("user")) {
         ipath = ipath.removeFirstSegments(2);
        String userName = ipath.segment(0);
        try {
          user = userManager.getUser(userName);
        } catch (UserException e) {
          // TODO surface error up the stack
View Full Code Here

Examples of org.eclipse.core.runtime.Path.removeFirstSegments()

        } catch (IOException e) {
          // TODO surface error up the stack
          e.printStackTrace();
          return null;
        }
        ipath = ipath.removeFirstSegments(1);
        if (ipath.segment(0).equals("ws") && ipath.segment(1).equals("workspace")) {
          ipath = ipath.removeFirstSegments(2);
        }
      } else {
        user = userManager.getSingleUser();
View Full Code Here

Examples of org.eclipse.core.runtime.Path.removeFirstSegments()

          e.printStackTrace();
          return null;
        }
        ipath = ipath.removeFirstSegments(1);
        if (ipath.segment(0).equals("ws") && ipath.segment(1).equals("workspace")) {
          ipath = ipath.removeFirstSegments(2);
        }
      } else {
        user = userManager.getSingleUser();
      }
      int removecount = 0;
View Full Code Here

Examples of org.eclipse.core.runtime.Path.removeFirstSegments()

        for (final OtpErlangObject ebeam : list) {
            final OtpErlangString beam = (OtpErlangString) ebeam;
            final String sbeam = beam.stringValue();
            IPath p = new Path(sbeam);
            p = p.removeLastSegments(1);
            p = p.removeFirstSegments(project.getLocation().segmentCount());
            p = p.setDevice(null);
            paths.put(p, sbeam);
        }
        for (final Entry<IPath, String> p : paths.entrySet()) {
            final IPath pp = p.getKey();
View Full Code Here

Examples of org.eclipse.core.runtime.Path.removeFirstSegments()

            }
            if(!includeLibs && files[i] instanceof VLibraryResource)
              continue;

          IPath filePath = new Path(files[i].getPath());
            String pathString = filePath.removeFirstSegments(filePath.matchingFirstSegments(root)).toString();
           
            if(pathString==null) return;
           
            /* remove leading characters that confuse and anger windows built in archive util */
            if(pathString.length() > 1 && pathString.indexOf("./")==0)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.