org.eclipse.xtext.builder.trace
Class AbstractLocationInResource
java.lang.Object
org.eclipse.xtext.builder.trace.AbstractLocationInResource
- All Implemented Interfaces:
- ILocationInResource
- Direct Known Subclasses:
- OffsetBasedLocationInResource
public abstract class AbstractLocationInResource
- extends java.lang.Object
- implements ILocationInResource
- Author:
- Sebastian Zarnekow - Initial contribution and API
- This class is not intended to be subclassed by clients.
- This class is not intended to be subclassed by clients.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractLocationInResource
protected AbstractLocationInResource(AbstractTrace trace)
getResourceURI
public abstract org.eclipse.emf.common.util.URI getResourceURI()
- Specified by:
getResourceURI
in interface ILocationInResource
- Returns:
- the EMF resource URI for this location. May be
null
if the
resource is not an EMF resource.
getProjectName
protected abstract java.lang.String getProjectName()
getOffset
protected abstract int getOffset()
getLength
protected abstract int getLength()
getLineNumber
protected abstract int getLineNumber()
getEndLineNumber
protected abstract int getEndLineNumber()
getStorage
@NonNull
public org.eclipse.core.resources.IStorage getStorage()
- Specified by:
getStorage
in interface ILocationInResource
- Returns:
- the storage handle for this location. Never
null
.
getTextRegion
public ITextRegionWithLineInformation getTextRegion()
- Specified by:
getTextRegion
in interface ILocationInResource
- Returns:
- the range in the resource. May be
null
.
getProject
@NonNull
public org.eclipse.core.resources.IProject getProject()
- Specified by:
getProject
in interface ILocationInResource
- Returns:
- the project for this location. Never
null
.
getLanguage
public LanguageInfo getLanguage()
- Specified by:
getLanguage
in interface ILocationInResource
- Returns:
- the language that this resource belongs to. May be
null
.
getEObjectURI
public org.eclipse.emf.common.util.URI getEObjectURI()
- Specified by:
getEObjectURI
in interface ILocationInResource
- Returns:
- the more specific
object
URI
for this location. May be null
if the resource itself is empty or if this
resource is not an EMF resource.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object