Package org.eclipse.core.runtime

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


      // set filters to NO filtering so that we can add it manually with
      // the FILTERTYPE expression!
      IPath path = new Path(tempDir + "/results"+RutaEngine.SCRIPT_FILE_EXTENSION);
      ae.setConfigParameterValue(RutaEngine.MAIN_SCRIPT, path.removeFileExtension()
              .lastSegment());
      ae.setConfigParameterValue(RutaEngine.SCRIPT_PATHS, new String[] { path
              .removeLastSegments(1).toPortableString() });
      ae.setConfigParameterValue(RutaEngine.RELOAD_SCRIPT, true);
      try {
        ae.reconfigure();
      } catch (ResourceConfigurationException e) {
View Full Code Here


    // set filters to NO filtering so that we can add it manually with
    // the FILTERTYPE expression!
    String tempRulesFileName = getTempRulesFileName();
    IPath path = new Path(tempRulesFileName);
    ae.setConfigParameterValue(RutaEngine.MAIN_SCRIPT, path.removeFileExtension().lastSegment());
    String portableString = path.removeLastSegments(1).toPortableString();
    ae.setConfigParameterValue(RutaEngine.SCRIPT_PATHS, new String[] { portableString });
    ae.setConfigParameterValue(RutaEngine.ADDITIONAL_SCRIPTS, new String[0]);
    ae.setConfigParameterValue(RutaEngine.RELOAD_SCRIPT, true);

    try {
View Full Code Here

         *
         * "/org/eclipse/osgi/3.5.0.v20090429-1630"
         */
        final IPath frameworkPath =
            new Path(karafPlatform.getState().getBundle(SystemBundleNames.EQUINOX.toString(), null).getLocation());
        equinoxProperties.put(OSGI_INSTALL_AREA_KEY, frameworkPath.removeLastSegments(1).toString());

        final String javaSpecificationVersion = getJavaRuntimeSpecificationVersion(configuration);
        equinoxProperties.put(JAVA_SPECIFICATION_VERSION, javaSpecificationVersion);

        /*
 
View Full Code Here

            IPath path = new Path( val );
            IResource resource = root.findMember( val );
           
            while( resource == null )
            {
                path = path.removeLastSegments( 1 );
                resource = root.findMember( path );
            }
           
            if( resource instanceof IFile && validFileSystemResourceTypeAnnotation.value() == FileSystemResourceType.FOLDER )
            {
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

      treeItem.setText(2,
          UIText.ExistingOrNewPage_SymbolicValueEmptyMapping);
    else {
      IPath relativePath = new Path(m.getGitDir());
      if (isAlternative) {
        IPath withoutLastSegment = relativePath.removeLastSegments(1);
        IPath path;
        if (withoutLastSegment.isEmpty())
          path = Path.fromPortableString("."); //$NON-NLS-1$
        else
          path = withoutLastSegment;
View Full Code Here

    IPath pathToWorkspaceFile = new Path(wsPathText.getText());
    IStatus status = ResourcesPlugin.getWorkspace().validatePath(wsPathText.getText(), IResource.FILE);
    if (status.isOK()) {
      //Trim file name from path
      IPath containerPath = pathToWorkspaceFile.removeLastSegments(1);
      IResource container = ResourcesPlugin.getWorkspace().getRoot().findMember(containerPath);
      if (container == null) {
        if (wsRadio.getSelection())
          setErrorMessage(UIText.GitCreatePatchWizard_WorkspacePatchSelectByBrowsing);
        return false;
View Full Code Here

          else
            right = GitFileRevision.inIndex(repository,
                repoRelativePath);
        }

        IPath containerPath = currentPath.removeLastSegments(1);
        ContainerNode containerNode = getOrCreateContainerNode(
            containerPath, type);

        FileNode fileNode = new FileNode(currentPath, file, type, left,
            right);
View Full Code Here

    while (path.segmentCount() > 0) {
      result.add(base.append(path).toString());
      // for backwards compatibility only, don't replace the slashes
      if (path.segmentCount() > 1)
        result.add(base.append(path.toString().replace('/', '_')).toString());
      path = path.removeLastSegments(1);
    }

    return (String[]) result.toArray(new String[result.size()]);
  }
View Full Code Here

    /**
     * Returns the parent folder of the given path.
     */
    public static IPath getParentFolderPath(String contentFilePath) {
        IPath path = new Path(contentFilePath);
        path = path.removeLastSegments(1).addTrailingSeparator();
        return path;
    }



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.