Package org.eclipse.cdt.core.index
Class URIRelativeLocationConverter
java.lang.Object
org.eclipse.cdt.core.index.URIRelativeLocationConverter
- All Implemented Interfaces:
IIndexLocationConverter
A IIndexLocationConverter for converting relative paths within an index, by prefixing them
with the supplied base URI.
Note: The supplied base URI must end with a forward slash
This location converter is internal-representation-compatible with ResourceContainerRelativeLocationConverter
- Since:
- 4.0
-
Constructor Summary
ConstructorDescriptionURIRelativeLocationConverter
(URI baseURI) Constructs an URIRelativeLocationConverter which will relative paths by prefixing the supplied base URI. -
Method Summary
Modifier and TypeMethodDescriptionfromInternalFormat
(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.toInternalFormat
(IIndexFileLocation location) Convert a IIndexFileLocation to the internal IIndexFragment implementation specific format or null if the location could not be translated.
-
Constructor Details
-
URIRelativeLocationConverter
Constructs an URIRelativeLocationConverter which will relative paths by prefixing the supplied base URI.- Parameters:
baseURI
- the URI which will form the absolute base that relative paths are concatenated to. Note: It must end with a forward slash.
-
-
Method Details
-
fromInternalFormat
Description copied from interface:IIndexLocationConverter
Convert a raw string in an internal IIndexFragment implementation specific format to an IIndexFileLocation or null if the internal format could not be translated.- Specified by:
fromInternalFormat
in interfaceIIndexLocationConverter
-
toInternalFormat
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 interfaceIIndexLocationConverter
- Returns:
- an internal representation for the location specified
-