Package org.eclipse.core.runtime

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


  @Override
  protected URI getLocation() throws URISyntaxException {
    if (tagLocation == null) {
      IPath p = new Path(cloneLocation.getPath());
      p = p.uptoSegment(1).append(RESOURCE).append(getName(false, true)).addTrailingSeparator().append(p.removeFirstSegments(2));
      tagLocation = new URI(cloneLocation.getScheme(), cloneLocation.getUserInfo(), cloneLocation.getHost(), cloneLocation.getPort(), p.toString(),
          cloneLocation.getQuery(), cloneLocation.getFragment());
    }
    return tagLocation;
  }
View Full Code Here


  @PropertyDescription(name = GitConstants.KEY_COMMIT)
  private URI getCommitLocation() throws URISyntaxException {
    if (commitLocation == null) {
      IPath p = new Path(cloneLocation.getPath());
      p = p.uptoSegment(1).append(Commit.RESOURCE).append(parseCommit().getName()).addTrailingSeparator().append(p.removeFirstSegments(2));
      commitLocation = new URI(cloneLocation.getScheme(), cloneLocation.getUserInfo(), cloneLocation.getHost(), cloneLocation.getPort(), p.toString(),
          cloneLocation.getQuery(), cloneLocation.getFragment());
    }
    return commitLocation;
  }
View Full Code Here

              IPath path = new Path(entryName);
              int segmentCount = path.segmentCount();
              if (segmentCount > 1) {
                for (int i = 0, max = path.segmentCount() - 1; i < max; i++) {
                  if (firstLevelPackageNames.contains(path.segment(i))) {
                    tempRoots.add(path.uptoSegment(i));
                    // don't break here as this path could contain other first level package names (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=74014)
                  }
                  if (i == max - 1 && containsADefaultPackage) {
                    tempRoots.add(path.uptoSegment(max));
                  }
View Full Code Here

                  if (firstLevelPackageNames.contains(path.segment(i))) {
                    tempRoots.add(path.uptoSegment(i));
                    // don't break here as this path could contain other first level package names (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=74014)
                  }
                  if (i == max - 1 && containsADefaultPackage) {
                    tempRoots.add(path.uptoSegment(max));
                  }
                }
              } else if (containsADefaultPackage) {
                tempRoots.add(new Path("")); //$NON-NLS-1$
              }
View Full Code Here

    IPath path = new Path(jarPath);
    rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(path);
  } else {
    IPath path = new Path(resourcePathString);
    if (ExternalFoldersManager.isInternalPathForExternalFolder(path)) {
      IResource resource = JavaModel.getWorkspaceTarget(path.uptoSegment(2/*linked folders for external folders are always of size 2*/));
      if (resource != null)
        rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(resource.getLocation());
    } else {
      rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(path);
      while (rootInfo == null && path.segmentCount() > 0) {
View Full Code Here

    IPath path = new Path(jarPath);
    rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(path);
  } else {
    IPath path = new Path(resourcePathString);
    if (ExternalFoldersManager.isInternalPathForExternalFolder(path)) {
      IResource resource = JavaModel.getWorkspaceTarget(path.uptoSegment(2/*linked folders for external folders are always of size 2*/));
      if (resource != null)
        rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(resource.getLocation());
    } else {
      rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(path);
      while (rootInfo == null && path.segmentCount() > 0) {
View Full Code Here

              IPath path = new Path(entryName);
              int segmentCount = path.segmentCount();
              if (segmentCount > 1) {
                for (int i = 0, max = path.segmentCount() - 1; i < max; i++) {
                  if (firstLevelPackageNames.contains(path.segment(i))) {
                    tempRoots.add(path.uptoSegment(i));
                    // don't break here as this path could contain other first level package names (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=74014)
                  }
                  if (i == max - 1 && containsADefaultPackage) {
                    tempRoots.add(path.uptoSegment(max));
                  }
View Full Code Here

                  if (firstLevelPackageNames.contains(path.segment(i))) {
                    tempRoots.add(path.uptoSegment(i));
                    // don't break here as this path could contain other first level package names (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=74014)
                  }
                  if (i == max - 1 && containsADefaultPackage) {
                    tempRoots.add(path.uptoSegment(max));
                  }
                }
              } else if (containsADefaultPackage) {
                tempRoots.add(new Path("")); //$NON-NLS-1$
              }
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.