Class ResourceContainerRelativeLocationConverter

  • All Implemented Interfaces:
    IIndexLocationConverter

    public class ResourceContainerRelativeLocationConverter
    extends java.lang.Object
    implements IIndexLocationConverter
    A location converter for converting project resource locations to be relative to a specified container. Resources outside of the associated project will not be converted (ignored).
    This location converter is internal-representation-compatible with URIRelativeLocationConverter
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.eclipse.core.runtime.IPath fullPath  
      protected org.eclipse.core.resources.IWorkspaceRoot root  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      IIndexFileLocation fromInternalFormat​(java.lang.String raw)
      Convert a raw string in an internal IIndexFragment implementation specific format to an IIndexFileLocation or null if the internal format could not be translated.
      java.lang.String toInternalFormat​(IIndexFileLocation location)
      Convert a IIndexFileLocation to the internal IIndexFragment implementation specific format or null if the location could not be translated.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • root

        protected org.eclipse.core.resources.IWorkspaceRoot root
      • fullPath

        protected org.eclipse.core.runtime.IPath fullPath
    • Constructor Detail

      • ResourceContainerRelativeLocationConverter

        public ResourceContainerRelativeLocationConverter​(org.eclipse.core.resources.IContainer container)
        Parameters:
        container - the resource container to convert relative to
    • Method Detail

      • toInternalFormat

        public java.lang.String toInternalFormat​(IIndexFileLocation location)
        Description copied from interface: IIndexLocationConverter
        Convert a IIndexFileLocation to the internal IIndexFragment implementation specific format or null if the location could not be translated.
        Specified by:
        toInternalFormat in interface IIndexLocationConverter
        Returns:
        an internal representation for the location specified