Package org.eclipse.core.runtime

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


    IPath pathname = new Path(entry.getName());
    TarEntry parent;
    if (pathname.segmentCount() == 1) {
      parent = root;
    } else {
      parent = (TarEntry) directoryEntryCache.get(pathname
          .removeLastSegments(1));
    }

    List childList = (List) children.get(parent);
    childList.add(entry);
View Full Code Here


    IPath pathname = new Path(entry.getName());
    PharEntry parent;
    if (pathname.segmentCount() == 1) {
      parent = root;
    } else {
      parent = (PharEntry) directoryEntryCache.get(pathname
          .removeLastSegments(1));
    }

    List childList = (List) children.get(parent);
    childList.add(entry);
View Full Code Here

      if (resource != null)
        rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(resource.getLocation());
    } else {
      rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(path);
      while (rootInfo == null && path.segmentCount() > 0) {
        path = path.removeLastSegments(1);
        rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(path);
      }
    }
  }
  if (rootInfo == null)
View Full Code Here

    if (initPath.length() == 0) {
      initPath = ""; //$NON-NLS-1$
    } else {
      IPath entryPath = new Path(initPath);
      if (ArchieveFileFilter.isZipPath(entryPath)) {
        entryPath.removeLastSegments(1);
      }
      initPath = entryPath.toOSString();
    }
    return initPath;
  }
View Full Code Here

        if (newPath != null && newPath.trim().length() > 0) {
          if (!isIniFileSet
              || (fPHPIni.getText() == null || fPHPIni.getText()
                  .trim().length() == 0)) {
            IPath path = new Path(newPath);
            path = path.removeLastSegments(1);
            path = path.append(PHP_INI);
            if (path.toFile().exists()) {
              fPHPIni.setText(path.toOSString());
            }
          }
View Full Code Here

          editor, lineNumber);
      return editor;
    }

    IPath path = new Path(filePath);
    String parentPath = path.removeLastSegments(1).toOSString();
    IFileStore fileStore = EFS.getLocalFileSystem().getStore(
        new Path(parentPath));

    fileStore = fileStore.getChild(path.lastSegment());
View Full Code Here

        String result = dialog.open();
        if (result == null) return null;

        Path path = new Path(result);
        WorkbenchCorePlugin.getDefault().getPreferenceStore().setValue(SAVE_PNG_PATH,
            path.removeLastSegments(1).toOSString());
        return path;
    }
}
View Full Code Here

    private void completeIncludedFolders() {
      Set<String> missingParentFolders = new HashSet<String>();
      for (String folder : includedFolders) {
        IPath filePath = new Path(folder);
        IPath parentPath = filePath.removeLastSegments(1);
        while (parentPath.segmentCount() > 0) {
          String pathAsString = parentPath.toOSString();
          if (!includedFolders.contains(pathAsString)) {
            missingParentFolders.add(pathAsString);
          }
View Full Code Here

        // /some/foo/
        // /some/
        // as included folders

        IPath filePath = new Path(file);
        IPath parentPath = filePath.removeLastSegments(1);
        while (parentPath.segmentCount() > 0) {
          if (includedFolders.add(parentPath.toOSString())) {
            parentPath = parentPath.removeLastSegments(1);
          } else {
            // Parent hierarchy already added
View Full Code Here

            count++;
            ite.remove();
            break;
          }
        }
        basedirPath = basedirPath.removeLastSegments(1);
      }
     
      return count;
    } finally {
      monitor.done();
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.