Class AbstractLocationInResource
- java.lang.Object
-
- org.eclipse.xtext.generator.trace.internal.AbstractLocationInResource
-
- All Implemented Interfaces:
ILocationInResource
- Direct Known Subclasses:
LocationInResource
public abstract class AbstractLocationInResource extends java.lang.Object implements ILocationInResource
- Noextend:
- This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractLocationInResource(AbstractTrace trace)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AbsoluteURI
getAbsoluteResourceURI()
java.io.InputStream
getContents()
Returns the contents of the resource.protected abstract int
getEndLineNumber()
LanguageInfo
getLanguage()
protected abstract int
getLength()
protected abstract int
getLineNumber()
protected abstract int
getOffset()
IProjectConfig
getProjectConfig()
abstract SourceRelativeURI
getSrcRelativeResourceURI()
Returns the URI of this resource relative to the classpath if applicable.org.eclipse.xtext.util.ITextRegionWithLineInformation
getTextRegion()
protected AbstractTrace
getTrace()
java.lang.String
toString()
-
-
-
Constructor Detail
-
AbstractLocationInResource
protected AbstractLocationInResource(AbstractTrace trace)
-
-
Method Detail
-
getSrcRelativeResourceURI
public abstract SourceRelativeURI getSrcRelativeResourceURI()
Description copied from interface:ILocationInResource
Returns the URI of this resource relative to the classpath if applicable. Otherwise the URI relative to the project root.- Specified by:
getSrcRelativeResourceURI
in interfaceILocationInResource
-
getOffset
protected abstract int getOffset()
-
getLength
protected abstract int getLength()
-
getLineNumber
protected abstract int getLineNumber()
-
getEndLineNumber
protected abstract int getEndLineNumber()
-
getTextRegion
public org.eclipse.xtext.util.ITextRegionWithLineInformation getTextRegion()
- Specified by:
getTextRegion
in interfaceILocationInResource
- Returns:
- the range in the resource. May be
null
.
-
getAbsoluteResourceURI
public AbsoluteURI getAbsoluteResourceURI()
- Specified by:
getAbsoluteResourceURI
in interfaceILocationInResource
- Returns:
- the EMF resource URI for this location. May be
null
if the resource is not an EMF resource.
-
getContents
public java.io.InputStream getContents() throws java.io.IOException
Description copied from interface:ILocationInResource
Returns the contents of the resource. May benull
.- Specified by:
getContents
in interfaceILocationInResource
- Throws:
java.io.IOException
-
getProjectConfig
public IProjectConfig getProjectConfig()
- Specified by:
getProjectConfig
in interfaceILocationInResource
- Returns:
- the project configuration for this location. Never
null
.
-
getLanguage
public LanguageInfo getLanguage()
- Specified by:
getLanguage
in interfaceILocationInResource
- Returns:
- the language that this resource belongs to. May be
null
.
-
getTrace
protected AbstractTrace getTrace()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-