congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IPath.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
org.eclipse.core.runtime.IPath

Best Java code snippets using org.eclipse.core.runtime.IPath.toString (Showing top 20 results out of 1,503)

origin: org.eclipse.jdt/org.eclipse.jdt.core

public ClasspathJar(String fileName, AccessRuleSet accessRuleSet, IPath externalAnnotationPath, boolean isOnModulePath) {
  this(fileName, 0, accessRuleSet, externalAnnotationPath, isOnModulePath);
  if (externalAnnotationPath != null)
    this.externalAnnotationPath = externalAnnotationPath.toString();
}

origin: org.eclipse.tycho/org.eclipse.jdt.core

ClasspathJar(String zipFilename, long lastModified, AccessRuleSet accessRuleSet, IPath externalAnnotationPath, boolean isOnModulePath) {
  this.zipFilename = zipFilename;
  this.lastModified = lastModified;
  this.zipFile = null;
  this.knownPackageNames = null;
  this.accessRuleSet = accessRuleSet;
  if (externalAnnotationPath != null)
    this.externalAnnotationPath = externalAnnotationPath.toString();
  this.isOnModulePath = isOnModulePath;
}

origin: org.eclipse.jdt/org.eclipse.jdt.ui

public static StringBuffer appendEncodePath(IPath path, StringBuffer buf) {
  if (path != null) {
    String str= path.toString();
    buf.append('[').append(str.length()).append(']').append(str);
  } else {
    buf.append('[').append(']');
  }
  return buf;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * @see org.eclipse.jdt.internal.compiler.env.IDependent#getFileName()
 */
@Override
public char[] getFileName(){
  return getPath().toString().toCharArray();
}

origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public String toString() {
  String start = "Binary classpath directory " + this.binaryFolder.getFullPath().toString(); //$NON-NLS-1$
  if (this.accessRuleSet == null)
    return start;
  return start + " with " + this.accessRuleSet; //$NON-NLS-1$
}

origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public boolean belongsTo(String projectNameOrJarPath) {
  // used to remove pending jobs because the project was deleted... not to delete index files
  // can be found either by project name or JAR path name
  return projectNameOrJarPath.equals(this.containerPath.segment(0))
    || projectNameOrJarPath.equals(this.containerPath.toString());
}
@Override
origin: org.eclipse.platform/org.eclipse.core.resources

  @Override
  public String toString() {
    String s = resource == null ? "null" : resource.getFullPath().toString(); //$NON-NLS-1$
    return "Node: " + s; //$NON-NLS-1$
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
protected IBinaryType createInfoFromClassFile(Openable classFile, IResource file) {
  String documentPath = classFile.getPath().toString();
  IBinaryType binaryType = (IBinaryType)this.binariesFromIndexMatches.get(documentPath);
  if (binaryType != null) {
    this.infoToHandle.put(binaryType, classFile);
    return binaryType;
  } else {
    return super.createInfoFromClassFile(classFile, file);
  }
}
@Override
origin: org.eclipse.tycho/org.eclipse.jdt.core

protected IBinaryType createInfoFromClassFile(Openable classFile, IResource file) {
  String documentPath = classFile.getPath().toString();
  IBinaryType binaryType = (IBinaryType)this.binariesFromIndexMatches.get(documentPath);
  if (binaryType != null) {
    this.infoToHandle.put(binaryType, classFile);
    return binaryType;
  } else {
    return super.createInfoFromClassFile(classFile, file);
  }
}
protected IBinaryType createInfoFromClassFileInJar(Openable classFile) {
origin: org.eclipse.jdt/org.eclipse.jdt.core

public char[][] fullInclusionPatternChars() {
  if (this.fullInclusionPatternChars == UNINIT_PATTERNS) {
    int length = this.inclusionPatterns.length;
    this.fullInclusionPatternChars = new char[length][];
    IPath prefixPath = this.path.removeTrailingSeparator();
    for (int i = 0; i < length; i++) {
      this.fullInclusionPatternChars[i] =
        prefixPath.append(this.inclusionPatterns[i]).toString().toCharArray();
    }
  }
  return this.fullInclusionPatternChars;
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

boolean isSourceFolderEmpty(IContainer sourceFolder) {
  String sourceFolderName = sourceFolder.getProjectRelativePath().addTrailingSeparator().toString();
  Object[] table = this.typeLocators.valueTable;
  for (int i = 0, l = table.length; i < l; i++)
    if (table[i] != null && ((String) table[i]).startsWith(sourceFolderName))
      return false;
  return true;
}

origin: org.eclipse.tycho/org.eclipse.jdt.core

public char[][] fullExclusionPatternChars() {
  if (this.fullExclusionPatternChars == UNINIT_PATTERNS) {
    int length = this.exclusionPatterns.length;
    this.fullExclusionPatternChars = new char[length][];
    IPath prefixPath = this.path.removeTrailingSeparator();
    for (int i = 0; i < length; i++) {
      this.fullExclusionPatternChars[i] =
        prefixPath.append(this.exclusionPatterns[i]).toString().toCharArray();
    }
  }
  return this.fullExclusionPatternChars;
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

WorkingCopyDocument(org.eclipse.jdt.core.ICompilationUnit workingCopy, SearchParticipant participant) {
  super(workingCopy.getPath().toString(), participant);
  this.charContents = ((CompilationUnit)workingCopy).getContents();
  this.workingCopy = workingCopy;
}
@Override
origin: org.eclipse.platform/org.eclipse.core.resources

private PropertyEntry getEntry(IPath path) {
  String pathAsString = path.toString();
  String[][] existing = (String[][]) getEntryValue(pathAsString);
  if (existing == null)
    return null;
  return new PropertyEntry(path, existing);
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

public static ClassFileReader newClassFileReader(IResource resource) throws CoreException, ClassFormatException, IOException {
  InputStream in = null;
  try {
    in = ((IFile) resource).getContents(true);
    return ClassFileReader.read(in, resource.getFullPath().toString());
  } finally {
    if (in != null)
      in.close();
  }
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

private IAccessRule loadAccessRule() throws IOException {
  int problemId = loadInt();
  IPath pattern = loadPath();
  return new ClasspathAccessRule(pattern.toString().toCharArray(), problemId);
}
origin: org.eclipse.tycho/org.eclipse.jdt.core

private void attachWorkspaceFilesToResource(List<IJavaElement> elementsMappingOntoLocation,
    NdResourceFile resourceFile) {
  for (IJavaElement next : elementsMappingOntoLocation) {
    IResource nextResource = next.getResource();
    if (nextResource != null) {
      new NdWorkspaceLocation(this.nd, resourceFile,
          nextResource.getFullPath().toString().toCharArray());
    }
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Notification before a compile that a unit is about to be compiled.
 */
public void aboutToCompile(SourceFile unit) {
  String message = Messages.bind(Messages.build_compiling, unit.resource.getFullPath().removeLastSegments(1).makeRelative().toString());
  subTask(message);
}

origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Trigger addition of a resource to an index
 * Note: the actual operation is performed in background
 */
public void addBinary(IFile resource, IPath containerPath) {
  if (JavaCore.getPlugin() == null) return;
  SearchParticipant participant = SearchEngine.getDefaultSearchParticipant();
  SearchDocument document = participant.getDocument(resource.getFullPath().toString());
  IndexLocation indexLocation = computeIndexLocation(containerPath);
  scheduleDocumentIndexing(document, containerPath, indexLocation, participant);
}
/**
origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * Trigger addition of a resource to an index
 * Note: the actual operation is performed in background
 */
public void addBinary(IFile resource, IPath containerPath) {
  if (JavaCore.getPlugin() == null) return;
  SearchParticipant participant = SearchEngine.getDefaultSearchParticipant();
  SearchDocument document = participant.getDocument(resource.getFullPath().toString());
  IndexLocation indexLocation = computeIndexLocation(containerPath);
  scheduleDocumentIndexing(document, containerPath, indexLocation, participant);
}
/**
org.eclipse.core.runtimeIPathtoString

Javadoc

Returns a string representation of this path, including its device id. The same separator, "/", is used on all platforms.

Example result strings (without and with device id):

 
"/foo/bar.txt" 
"bar.txt" 
"/foo/" 
"foo/" 
"" 
"/" 
"C:/foo/bar.txt" 
"C:bar.txt" 
"C:/foo/" 
"C:foo/" 
"C:" 
"C:/" 
This string is suitable for passing to Path(String).

Popular methods of IPath

  • toFile
    Returns a java.io.File corresponding to this path.
  • toOSString
    Returns a string representation of this path which uses the platform-dependent path separator define
  • append
    Returns the canonicalized path obtained from the concatenation of the given path's segments to the e
  • segmentCount
    Returns the number of segments in this path. Note that both root and empty paths have 0 segments.
  • removeLastSegments
    Returns a copy of this path with the given number of segments removed from the end. The device id is
  • lastSegment
    Returns the last segment of this path, ornull if it does not have any segments.
  • removeFirstSegments
    Returns a copy of this path with the given number of segments removed from the beginning. The device
  • segment
    Returns the specified segment of this path, ornull if the path does not have such a segment.
  • equals
    Returns whether this path equals the given object. Equality for paths is defined to be: same sequenc
  • isAbsolute
    Returns whether this path is an absolute path (ignoring any device id). Absolute paths start with a
  • isPrefixOf
    Returns whether this path is a prefix of the given path. To be a prefix, this path's segments must a
  • toPortableString
    Returns a platform-neutral string representation of this path. The format is not specified, except t
  • isPrefixOf,
  • toPortableString,
  • makeRelative,
  • makeAbsolute,
  • getDevice,
  • isEmpty,
  • addTrailingSeparator,
  • getFileExtension,
  • setDevice

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getResourceAsStream (ClassLoader)
  • getSystemService (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now