Examples of toOSString()


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

private SimpleLookupTable getIndexStates() {
  if (this.indexStates != null) return this.indexStates;

  this.indexStates = new SimpleLookupTable();
  IPath indexesDirectoryPath = getJavaPluginWorkingLocation();
  char[][] savedNames = readIndexState(indexesDirectoryPath.toOSString());
  if (savedNames != null) {
    for (int i = 1, l = savedNames.length; i < l; i++) { // first name is saved signature, see readIndexState()
      char[] savedName = savedNames[i];
      if (savedName.length > 0) {
        IPath indexLocation = indexesDirectoryPath.append(new String(savedName)); // shares indexesDirectoryPath's segments
View Full Code Here

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 /*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

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

  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())
    indexFile.delete();
  this.indexes.removeKey(indexLocation);
  updateIndexState(indexLocation, null);
}
View Full Code Here

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

      // out in xxxImageBuilder.acceptResult() instead.
      // simply return the default output directory for the project.
      String filename = new String(eclipseClassFileName);
      IPath out = outputLocation.append(filename);
      out.addFileExtension(".class");
      return out.toOSString();
    }

  }

  // default impl class until the implementation is extended to cope with inpath, injars
View Full Code Here

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

protected IBinaryType createInfoFromClassFileInJar(Openable classFile) {
  String filePath = (((ClassFile)classFile).getType().getFullyQualifiedName('$')).replace('.', '/') + SuffixConstants.SUFFIX_STRING_class;
  IPackageFragmentRoot root = classFile.getPackageFragmentRoot();
  IPath path = root.getPath();
  // take the OS path for external jars, and the forward slash path for internal jars
  String rootPath = path.getDevice() == null ? path.toString() : path.toOSString();
  String documentPath = rootPath + IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR + filePath;
  IBinaryType binaryType = (IBinaryType)this.binariesFromIndexMatches.get(documentPath);
  if (binaryType != null) {
    this.infoToHandle.put(binaryType, classFile);
    return binaryType;
View Full Code Here

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

          case IClasspathEntry.CPE_LIBRARY:
          case IClasspathEntry.CPE_VARIABLE:
            if ((includeMask & APPLICATION_LIBRARIES) != 0) {
              IPath path = entry.getPath();
              if (pathToAdd == null || pathToAdd.equals(path)) {
                String pathToString = path.getDevice() == null ? path.toString() : path.toOSString();
                add(projectPath.toString(), "", pathToString, false/*not a package*/, access); //$NON-NLS-1$
                addEnclosingProjectOrJar(path);
              }
            }
            break;
View Full Code Here

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

            if (container == null) break;
            if ((container.getKind() == IClasspathContainer.K_APPLICATION && (includeMask & APPLICATION_LIBRARIES) != 0)
                || (includeMask & SYSTEM_LIBRARIES) != 0) {
              IPath path = entry.getPath();
              if (pathToAdd == null || pathToAdd.equals(path)) {
                String pathToString = path.getDevice() == null ? path.toString() : path.toOSString();
                add(projectPath.toString(), "", pathToString, false/*not a package*/, access); //$NON-NLS-1$
                addEnclosingProjectOrJar(path);
              }
            }
            break;
View Full Code Here

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

  }
  IPackageFragmentRoot root = (IPackageFragmentRoot) element.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
  if (root != null && root.isArchive()) {
    // external or internal jar
    IPath rootPath = root.getPath();
    String rootPathToString = rootPath.getDevice() == null ? rootPath.toString() : rootPath.toOSString();
    IPath relativePath = getPath(element, true/*relative path*/);
    return indexOf(rootPathToString, relativePath.toString()) >= 0;
  }
  // resource in workspace
  String fullResourcePathString = getPath(element, false/*full path*/).toString();
 
View Full Code Here

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

        IPath rootPath = root.getPath();
        int matchingCount = rootPath.matchingFirstSegments(path);
        if (matchingCount != 0) {
          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

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

        if (workspaceLocation == null)
            throw new IOException("Cannot determine workspace location.");

        IPath location = workspaceLocation.append(path);

        return new URL("file", null, location.toOSString()).openConnection();
    }

}
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.