Package org.eclipse.core.runtime

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

  public static synchronized String getEngineDescriptorFromTMSourceFile(IPath scriptFilePath) {
    IPath folder = scriptFilePath;

    while (!folder.lastSegment().equals(RutaProjectUtils.getDefaultScriptLocation())) {
      folder = folder.removeLastSegments(1);
    }
    IPath relativeTo = scriptFilePath.makeRelativeTo(folder);
    IPath projectPath = folder.removeLastSegments(1);
    String elementName = scriptFilePath.lastSegment();
    int lastIndexOf = elementName.lastIndexOf(RutaEngine.SCRIPT_FILE_EXTENSION);
View Full Code Here

  public static synchronized String getTypeSystemDescriptorFromTMSourceFile(IPath scriptFilePath) {
    IPath folder = scriptFilePath;

    while (!folder.lastSegment().equals(RutaProjectUtils.getDefaultScriptLocation())) {
      folder = folder.removeLastSegments(1);
    }
    IPath relativeTo = scriptFilePath.makeRelativeTo(folder);
    IPath projectPath = folder.removeLastSegments(1);
    String elementName = scriptFilePath.lastSegment();
    int lastIndexOf = elementName.lastIndexOf(RutaEngine.SCRIPT_FILE_EXTENSION);
View Full Code Here

      return null;
    }
    if (path.hasTrailingSeparator()) {
      return path;
    }
    path = path.removeLastSegments(1);
    if (path.isEmpty()) {
      return null;
    }
    return path.addTrailingSeparator();
  }
View Full Code Here

      return null;
    }
    if (path.hasTrailingSeparator()) {
      return path;
    }
    path = path.removeLastSegments(1);
    if (path.isEmpty()) {
      return null;
    }
    return path.addTrailingSeparator();
  }
View Full Code Here

            final KarafPlatformValidator validator = f.getPlatformValidator();

            IPath modelPath = new Path(karafPlatformPlugin.getInstallLocation()).removeLastSegments(1);
            while(!modelPath.isEmpty() && !modelPath.isRoot()) {
                modelPath = modelPath.removeLastSegments(1);

                if (validator.isValid(modelPath)) {
                    return f.getPlatformModel(modelPath);
                }
            }
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

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.