Package org.eclipse.core.runtime

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


    Index index = getIndex(indexLocation);
    ReadWriteMonitor monitor = index == null ? null : index.monitor;

    if (VERBOSE)
      Util.verbose("-> recreating index: "+indexLocation+" for path: "+containerPathString); //$NON-NLS-1$ //$NON-NLS-2$
    index = new Index(indexLocation.toOSString(), containerPathString, false /*do not reuse index file*/);
    this.indexes.put(indexLocation, index);
    index.monitor = monitor;
    return index;
  } catch (IOException e) {
    // The file could not be created. Possible reason: the project has been deleted.
View Full Code Here


  if (index != null) {
    index.monitor = null;
    indexFile = index.getIndexFile();
  }
  if (indexFile == null)
    indexFile = new File(indexLocation.toOSString()); // index is not cached yet, but still want to delete the file
  if (indexFile.exists()) {
    if (DEBUG)
      Util.verbose("removing index file " + indexFile); //$NON-NLS-1$
    indexFile.delete();
  }
View Full Code Here

    Object[] indexFiles = this.participantsContainers.keyTable;
    Object[] containers = this.participantsContainers.valueTable;
    for (int i = 0, l = indexFiles.length; i < l; i++) {
      IPath indexFile = (IPath)indexFiles[i];
      if (indexFile != null) {
        writer.write(indexFile.toOSString());
        writer.write('\n');
        writer.write(((IPath)containers[i]).toOSString());
        writer.write('\n');
      }
    }
View Full Code Here

        }
        IPath rootPath = root.getPath();
        if (rootPath.isPrefixOf(path)) {
          String name = path.toOSString();
          // + 1 is for the File.separatorChar
          name = name.substring(rootPath.toOSString().length() + 1, name.length());
          name = name.replace(File.separatorChar, '.');
          IJavaElement[] list = null;
          try {
            list = root.getChildren();
          } catch (JavaModelException npe) {
View Full Code Here

        IPath path = getWorkingDirectoryPath(configuration);
        if (path == null) return null;
       
        if (path.isAbsolute())
        {
            File dir = new File(path.toOSString());
            if (dir.isDirectory()) return dir;
        }
       
        // If we get here, we assume that the entered path is workspace-relative.
        // This is true for paths that do not start with slash, but also for
View Full Code Here

    private void addJavaElementPath(Project fbProject) {
        if (javaElt != null) {
            IPath path = getPath();
            if (path != null) {
                fbProject.addFile(path.toOSString());
            }
        }
    }

    public void clearMarkers() throws CoreException {
View Full Code Here

            // doesn't return jre libraries
            String[] defaultClassPath = JavaRuntime.computeDefaultRuntimeClassPath(javaProject);
            for (String classpathEntry : defaultClassPath) {
                IPath path = new Path(classpathEntry);
                if(isValidPath(path)) {
                    classPath.add(path.toOSString());
                }
            }
            // add CPE_CONTAINER classpathes
            IClasspathEntry[] rawClasspath = javaProject.getRawClasspath();
            for (IClasspathEntry entry : rawClasspath) {
View Full Code Here

                    if (classpathContainer != null && !(classpathContainer instanceof JREContainer)) {
                        IClasspathEntry[] classpathEntries = classpathContainer.getClasspathEntries();
                        for (IClasspathEntry iClasspathEntry : classpathEntries) {
                            IPath path = iClasspathEntry.getPath();
                            if (isValidPath(path)) {
                                classPath.add(path.toOSString());
                            }
                        }
                    }
                }
            }
View Full Code Here

        for (BundleDescription bd : bundles) {
            appendBundleToClasspath(bd, pdeClassPath, defaultOutputLocation);
        }

        if(defaultOutputLocation != null) {
            String defaultOutput = defaultOutputLocation.toOSString();
            if(pdeClassPath.indexOf(defaultOutput) > 0) {
                pdeClassPath.remove(defaultOutput);
                pdeClassPath.add(0, defaultOutput);
            }
        }
View Full Code Here

                location = cpe.getPath();
            }
            if (location == null) {
                continue;
            }
            String locationStr = location.toOSString();
            if (pdeClassPath.contains(locationStr)){
                continue;
            }
            // extra cleanup for some directories on classpath
            String bundleLocation = bd.getLocation();
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.