Interface IPlatformSpecificTrace<PlatformResource,Location extends IPlatformSpecificLocation<? extends PlatformResource>>
-
- All Superinterfaces:
ITrace
public interface IPlatformSpecificTrace<PlatformResource,Location extends IPlatformSpecificLocation<? extends PlatformResource>> extends ITrace
SPI for platform specific enhancements to the traces.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Iterable<? extends Location>
getAllAssociatedLocations()
Returns all known associatedlocations
.java.lang.Iterable<? extends Location>
getAllAssociatedLocations(AbsoluteURI uri)
Returns all knownlocations
that were produced from the associated resource in the givenabsoluteTargetResource
.java.lang.Iterable<? extends Location>
getAllAssociatedLocations(org.eclipse.xtext.util.ITextRegion localRegion)
Returns all associatedlocations
that match the givenregion
.java.lang.Iterable<? extends Location>
getAllAssociatedLocations(org.eclipse.xtext.util.ITextRegion localRegion, AbsoluteURI uri)
Returns all individuallocations
that match the givenlocalRegion
for the expectedabsoluteTargetResource
.java.lang.Iterable<? extends Location>
getAllAssociatedLocations(org.eclipse.xtext.util.ITextRegion localRegion, PlatformResource associatedStorage)
java.lang.Iterable<? extends Location>
getAllAssociatedLocations(PlatformResource associatedStorage)
Returns all knownlocations
that were produced from the associated resource in the giventargetResource
.Location
getBestAssociatedLocation(org.eclipse.xtext.util.ITextRegion localRegion)
Returns the best associatedlocation
that matches the givenregion
.Location
getBestAssociatedLocation(org.eclipse.xtext.util.ITextRegion localRegion, AbsoluteURI uri)
Location
getBestAssociatedLocation(org.eclipse.xtext.util.ITextRegion localRegion, PlatformResource associatedStorage)
PlatformResource
getLocalStorage()
Returns the storage that is associated with this trace.-
Methods inherited from interface org.eclipse.xtext.generator.trace.ITrace
getLocalLanguage, getLocalProjectConfig, getLocalURI, getSrcRelativeLocalURI, hasTraceData
-
-
-
-
Method Detail
-
getLocalStorage
PlatformResource getLocalStorage()
Returns the storage that is associated with this trace.- Returns:
- the associated storage. Never
null
.
-
getBestAssociatedLocation
Location getBestAssociatedLocation(org.eclipse.xtext.util.ITextRegion localRegion, PlatformResource associatedStorage)
Returns the bestlocation
that matches the givensourceRegion
in thetargetResource
. If the region does not match a single location in the target, the following strategy applies:-
The merged region of all matching locations in the
targetResource
is returned.
sourceRegion
does not yield a location intargetResource
, returnsnull
.- Parameters:
localRegion
- the region in the current resource. May not benull
.associatedStorage
- the expected target resource. May not benull
.- Returns:
- the best associated location or
null
if none.
-
The merged region of all matching locations in the
-
getAllAssociatedLocations
java.lang.Iterable<? extends Location> getAllAssociatedLocations(org.eclipse.xtext.util.ITextRegion localRegion, PlatformResource associatedStorage)
- Parameters:
localRegion
- the region in the current resource. May not benull
.associatedStorage
- the expected target resource. May not benull
.- Returns:
- all associated locations. Never
null
.
-
getAllAssociatedLocations
java.lang.Iterable<? extends Location> getAllAssociatedLocations(PlatformResource associatedStorage)
Returns all knownlocations
that were produced from the associated resource in the giventargetResource
.- Parameters:
associatedStorage
- the expected target resource. May not benull
.- Returns:
- all locations. Never
null
.
-
getBestAssociatedLocation
Location getBestAssociatedLocation(org.eclipse.xtext.util.ITextRegion localRegion)
Description copied from interface:ITrace
Returns the best associatedlocation
that matches the givenregion
. If the region does not match a single location, the following strategy applies:- If the region spans multiple locations where the first and the last location belong to the same resource, the merged location is returned.
- If the region spans multiple locations that belong to different resources, the longest prefix location for a single resource is returned.
-
If the region spans multiple overlapping locations that belong to different resources,
null
is returned.
null
.- Specified by:
getBestAssociatedLocation
in interfaceITrace
- Parameters:
localRegion
- the region in the current resource. May not benull
.- Returns:
- the best associated location or
null
if none.
-
getAllAssociatedLocations
java.lang.Iterable<? extends Location> getAllAssociatedLocations(org.eclipse.xtext.util.ITextRegion localRegion)
Description copied from interface:ITrace
Returns all associatedlocations
that match the givenregion
.- Specified by:
getAllAssociatedLocations
in interfaceITrace
- Parameters:
localRegion
- the region in the current resource. May not benull
.- Returns:
- all associated locations. Never
null
.
-
getAllAssociatedLocations
java.lang.Iterable<? extends Location> getAllAssociatedLocations()
Description copied from interface:ITrace
Returns all known associatedlocations
.- Specified by:
getAllAssociatedLocations
in interfaceITrace
- Returns:
- all associated locations. Never
null
.
-
getBestAssociatedLocation
Location getBestAssociatedLocation(org.eclipse.xtext.util.ITextRegion localRegion, AbsoluteURI uri)
Description copied from interface:ITrace
Returns the bestlocation
that matches the givenlocalRegion
in theabsoluteTargetResource
. If the region does not match a single location in the target, the following strategy applies:-
The merged region of all matching locations in the
targetResource
is returned.
localRegion
does not yield a location inabsoluteTargetResource
, returnsnull
.- Specified by:
getBestAssociatedLocation
in interfaceITrace
- Parameters:
localRegion
- the region in the current resource. May not benull
.uri
- the expected target resource. May not benull
.- Returns:
- the best associated location or
null
if none.
-
The merged region of all matching locations in the
-
getAllAssociatedLocations
java.lang.Iterable<? extends Location> getAllAssociatedLocations(org.eclipse.xtext.util.ITextRegion localRegion, AbsoluteURI uri)
Description copied from interface:ITrace
Returns all individuallocations
that match the givenlocalRegion
for the expectedabsoluteTargetResource
.- Specified by:
getAllAssociatedLocations
in interfaceITrace
- Parameters:
localRegion
- the region in the current resource. May not benull
.uri
- the expected target resource. May not benull
.- Returns:
- all associated locations. Never
null
.
-
getAllAssociatedLocations
java.lang.Iterable<? extends Location> getAllAssociatedLocations(AbsoluteURI uri)
Description copied from interface:ITrace
Returns all knownlocations
that were produced from the associated resource in the givenabsoluteTargetResource
.- Specified by:
getAllAssociatedLocations
in interfaceITrace
- Parameters:
uri
- the expected target resource. May not benull
.- Returns:
- all locations. Never
null
.
-
-