Interface ILocationInResource
-
- All Known Subinterfaces:
IPlatformSpecificLocation<PlatformResource>
- All Known Implementing Classes:
AbstractLocationInResource,LocationInResource
public interface ILocationInResourceDescribes the location in a given file or storage.- Since:
- 2.3
- Noextend:
- This interface is not intended to be extended by clients.
- Noimplement:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AbsoluteURIgetAbsoluteResourceURI()java.io.InputStreamgetContents()Returns the contents of the resource.LanguageInfogetLanguage()IProjectConfiggetProjectConfig()SourceRelativeURIgetSrcRelativeResourceURI()Returns the URI of this resource relative to the classpath if applicable.org.eclipse.xtext.util.ITextRegionWithLineInformationgetTextRegion()
-
-
-
Method Detail
-
getLanguage
LanguageInfo getLanguage()
- Returns:
- the language that this resource belongs to. May be
null.
-
getAbsoluteResourceURI
AbsoluteURI getAbsoluteResourceURI()
- Returns:
- the EMF resource URI for this location. May be
nullif the resource is not an EMF resource.
-
getSrcRelativeResourceURI
SourceRelativeURI getSrcRelativeResourceURI()
Returns the URI of this resource relative to the classpath if applicable. Otherwise the URI relative to the project root.
-
getContents
java.io.InputStream getContents() throws java.io.IOExceptionReturns the contents of the resource. May benull.- Throws:
java.io.IOException
-
getProjectConfig
IProjectConfig getProjectConfig()
- Returns:
- the project configuration for this location. Never
null.
-
getTextRegion
org.eclipse.xtext.util.ITextRegionWithLineInformation getTextRegion()
- Returns:
- the range in the resource. May be
null.
-
-