Examples of uptoSegment()


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

    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

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

              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

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

                  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

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

            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

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

                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

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

    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

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

              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

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

                  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

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

      }
     
      if (entryPath.segmentCount() == pathLength + 1) {
        childZipEntries.put(zipEntry.getName(), zipEntry);
      } else {
        String name = entryPath.uptoSegment(pathLength + 1).
          addTrailingSeparator().toString();
       
        if (!childZipEntries.containsKey(name)) {
          ZipEntry dirEntry = new ZipEntry(name);
          childZipEntries.put(name, dirEntry);
View Full Code Here

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

    if (sourceFolder != null) {
      path = sourceFolder.getProjectRelativePath().append(path);
    }

    for (int ii = 1; ii <= path.segmentCount(); ii++) {
      IPath subpath = path.uptoSegment(ii);
      IFolder subfolder = project.getFolder(subpath);
     
      if (subfolder.exists() == false) {
        subfolder.create(true, true, monitor);
      }
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.