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 protectedAbstractLocationInResource(AbstractTrace trace)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AbsoluteURIgetAbsoluteResourceURI()java.io.InputStreamgetContents()Returns the contents of the resource.protected abstract intgetEndLineNumber()LanguageInfogetLanguage()protected abstract intgetLength()protected abstract intgetLineNumber()protected abstract intgetOffset()IProjectConfiggetProjectConfig()abstract SourceRelativeURIgetSrcRelativeResourceURI()Returns the URI of this resource relative to the classpath if applicable.org.eclipse.xtext.util.ITextRegionWithLineInformationgetTextRegion()protected AbstractTracegetTrace()java.lang.StringtoString()
-
-
-
Constructor Detail
-
AbstractLocationInResource
protected AbstractLocationInResource(AbstractTrace trace)
-
-
Method Detail
-
getSrcRelativeResourceURI
public abstract SourceRelativeURI getSrcRelativeResourceURI()
Description copied from interface:ILocationInResourceReturns the URI of this resource relative to the classpath if applicable. Otherwise the URI relative to the project root.- Specified by:
getSrcRelativeResourceURIin 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:
getTextRegionin interfaceILocationInResource- Returns:
- the range in the resource. May be
null.
-
getAbsoluteResourceURI
public AbsoluteURI getAbsoluteResourceURI()
- Specified by:
getAbsoluteResourceURIin interfaceILocationInResource- Returns:
- the EMF resource URI for this location. May be
nullif the resource is not an EMF resource.
-
getContents
public java.io.InputStream getContents() throws java.io.IOExceptionDescription copied from interface:ILocationInResourceReturns the contents of the resource. May benull.- Specified by:
getContentsin interfaceILocationInResource- Throws:
java.io.IOException
-
getProjectConfig
public IProjectConfig getProjectConfig()
- Specified by:
getProjectConfigin interfaceILocationInResource- Returns:
- the project configuration for this location. Never
null.
-
getLanguage
public LanguageInfo getLanguage()
- Specified by:
getLanguagein interfaceILocationInResource- Returns:
- the language that this resource belongs to. May be
null.
-
getTrace
protected AbstractTrace getTrace()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-