Examples of removeFirstSegments()


Examples of org.eclipse.core.runtime.IPath.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.IPath.removeFirstSegments()

        IProject project = sigil.getProject().getWorkspace().getRoot().getProject(
            p.segment(0));
        if (project.exists())
        {
            p = project.getLocation().append(p.removeFirstSegments(1));
        }

        files.add(p.toFile());
    }
View Full Code Here

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

    private void convertSource(ISigilProjectModel sigil, IClasspathEntry cp,
        List<File> files) throws JavaModelException
    {
        IPath path = cp.getOutputLocation() == null ? sigil.getJavaModel().getOutputLocation()
            : cp.getOutputLocation();
        IFolder buildFolder = sigil.getProject().getFolder(path.removeFirstSegments(1));
        if (buildFolder.exists())
        {
            files.add(buildFolder.getLocation().toFile());
        }
    }
View Full Code Here

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

            if (project.exists() && !javaProject.exists()) {
              // then it's not a java project..
              return EMPTY_STATE;
            }
      IPath outputLocation = javaProject.getOutputLocation();
      outputLocation = outputLocation.removeFirstSegments(1);
      IPath manifestFilePath = outputLocation.append("META-INF/MANIFEST.MF");
      IFile manifestFile = project.getFile(manifestFilePath);
      String bundlename;
      if (manifestFile.exists()) {
        Manifest manifest = new Manifest(manifestFile.getContents());
View Full Code Here

Examples of org.eclipse.core.runtime.IPath.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.IPath.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.IPath.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.IPath.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.IPath.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.IPath.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
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.