Class UNCPathConverter


  • public abstract class UNCPathConverter
    extends Object
    Base class for the UNC path conversion extension point. UNC paths are used to represent remote include locations, and this class is used to translate between UNC, IPath and URI representations. By default, paths are translated into the equivalent local file version to preserve existing behavior, but by providing an appropriate extension, these paths can be mapped into locations on a remote system. May be subclassed by clients.
    Since:
    5.3
    • Constructor Detail

      • UNCPathConverter

        public UNCPathConverter()
    • Method Detail

      • getInstance

        public static UNCPathConverter getInstance()
        Get the instance of the class that combines the registered converters.
        Returns:
        instance of UNCPathConverter
      • isUNC

        public static boolean isUNC​(String path)
        Test if the string path is in UNC format.
        Parameters:
        path - path to test
        Returns:
        true if the path is in UNC format, false otherwise
      • toPath

        public static org.eclipse.core.runtime.IPath toPath​(URI uri)
        Convert a URI to an IPath. Resolves to local path if possible, including using EFS where required.
        Parameters:
        uri - URI to convert to an IPath
        Returns:
        IPath representation of the URI
      • toURI

        public abstract URI toURI​(org.eclipse.core.runtime.IPath path)
        Convert an IPath to a URI.
        Parameters:
        path - path to convert
        Returns:
        URI representation of the IPath
      • toURI

        public abstract URI toURI​(String path)
        Convert a string path to a URI
        Parameters:
        path - path to convert
        Returns:
        URI representation of the path