public interface ITrace
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<? extends ILocationInResource> |
getAllAssociatedLocations()
Returns all known associated
locations . |
java.lang.Iterable<? extends ILocationInResource> |
getAllAssociatedLocations(AbsoluteURI absoluteTargetResource)
Returns all known
locations that were produced from the associated resource in the
given absoluteTargetResource . |
java.lang.Iterable<? extends ILocationInResource> |
getAllAssociatedLocations(ITextRegion localRegion)
Returns all associated
locations that match the given region . |
java.lang.Iterable<? extends ILocationInResource> |
getAllAssociatedLocations(ITextRegion localRegion,
AbsoluteURI absoluteTargetResource)
Returns all individual
locations that match the given localRegion
for the expected absoluteTargetResource . |
ILocationInResource |
getBestAssociatedLocation(ITextRegion localRegion)
Returns the best associated
location that matches the given region . |
ILocationInResource |
getBestAssociatedLocation(ITextRegion localRegion,
AbsoluteURI absoluteTargetResource)
|
LanguageInfo |
getLocalLanguage()
Returns the language that is associated with the local resource.
|
IProjectConfig |
getLocalProjectConfig()
Returns the local project.
|
AbsoluteURI |
getLocalURI()
Returns the absolute URI of the local resource.
|
SourceRelativeURI |
getSrcRelativeLocalURI()
Returns the relative URI of the local resource.
|
boolean |
hasTraceData()
Returns true if the trace is not empty and can provide at leat one location.
|
ILocationInResource getBestAssociatedLocation(ITextRegion localRegion)
location
that matches the given region
.
If the region does not match a single location, the following strategy applies:
null
is returned.
null
.localRegion
- the region in the current resource. May not be null
.null
if none.java.lang.Iterable<? extends ILocationInResource> getAllAssociatedLocations(ITextRegion localRegion)
locations
that match the given region
.localRegion
- the region in the current resource. May not be null
.null
.java.lang.Iterable<? extends ILocationInResource> getAllAssociatedLocations()
locations
.null
.IProjectConfig getLocalProjectConfig()
null
.null
.AbsoluteURI getLocalURI()
null
.null
.SourceRelativeURI getSrcRelativeLocalURI()
null
.
In other words: returns the URI as it would be relative to the class path
after the resource was packaged. If the resource resides in a source folder
of a java project, it'll return the URI relative to the source folder itself.
Otherwise relative to the project root.null
.LanguageInfo getLocalLanguage()
null
if the artifact does not have an associated Xtext language, e.g. for html or java files.null
.ILocationInResource getBestAssociatedLocation(ITextRegion localRegion, AbsoluteURI absoluteTargetResource)
location
that matches the given
localRegion
in the absoluteTargetResource
.
If the region does not match a single location in the target, the following strategy applies:
targetResource
is returned.
localRegion
does not yield
a location in absoluteTargetResource
, returns null
.localRegion
- the region in the current resource. May not be null
.absoluteTargetResource
- the expected target resource. May not be null
.null
if none.java.lang.Iterable<? extends ILocationInResource> getAllAssociatedLocations(ITextRegion localRegion, AbsoluteURI absoluteTargetResource)
locations
that match the given localRegion
for the expected absoluteTargetResource
.localRegion
- the region in the current resource. May not be null
.absoluteTargetResource
- the expected target resource. May not be null
.null
.java.lang.Iterable<? extends ILocationInResource> getAllAssociatedLocations(AbsoluteURI absoluteTargetResource)
locations
that were produced from the associated resource in the
given absoluteTargetResource
.absoluteTargetResource
- the expected target resource. May not be null
.null
.boolean hasTraceData()