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 knownlocationsthat were produced from the associated resource in the givenabsoluteTargetResource.java.lang.Iterable<? extends Location>getAllAssociatedLocations(org.eclipse.xtext.util.ITextRegion localRegion)Returns all associatedlocationsthat match the givenregion.java.lang.Iterable<? extends Location>getAllAssociatedLocations(org.eclipse.xtext.util.ITextRegion localRegion, AbsoluteURI uri)Returns all individuallocationsthat match the givenlocalRegionfor 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 knownlocationsthat were produced from the associated resource in the giventargetResource.LocationgetBestAssociatedLocation(org.eclipse.xtext.util.ITextRegion localRegion)Returns the best associatedlocationthat matches the givenregion.LocationgetBestAssociatedLocation(org.eclipse.xtext.util.ITextRegion localRegion, AbsoluteURI uri)LocationgetBestAssociatedLocation(org.eclipse.xtext.util.ITextRegion localRegion, PlatformResource associatedStorage)PlatformResourcegetLocalStorage()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 bestlocationthat matches the givensourceRegionin 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
targetResourceis returned.
sourceRegiondoes 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
nullif 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 knownlocationsthat 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:ITraceReturns the best associatedlocationthat 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,
nullis returned.
null.- Specified by:
getBestAssociatedLocationin interfaceITrace- Parameters:
localRegion- the region in the current resource. May not benull.- Returns:
- the best associated location or
nullif none.
-
getAllAssociatedLocations
java.lang.Iterable<? extends Location> getAllAssociatedLocations(org.eclipse.xtext.util.ITextRegion localRegion)
Description copied from interface:ITraceReturns all associatedlocationsthat match the givenregion.- Specified by:
getAllAssociatedLocationsin 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:ITraceReturns all known associatedlocations.- Specified by:
getAllAssociatedLocationsin interfaceITrace- Returns:
- all associated locations. Never
null.
-
getBestAssociatedLocation
Location getBestAssociatedLocation(org.eclipse.xtext.util.ITextRegion localRegion, AbsoluteURI uri)
Description copied from interface:ITraceReturns the bestlocationthat matches the givenlocalRegionin 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
targetResourceis returned.
localRegiondoes not yield a location inabsoluteTargetResource, returnsnull.- Specified by:
getBestAssociatedLocationin 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
nullif 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:ITraceReturns all individuallocationsthat match the givenlocalRegionfor the expectedabsoluteTargetResource.- Specified by:
getAllAssociatedLocationsin 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:ITraceReturns all knownlocationsthat were produced from the associated resource in the givenabsoluteTargetResource.- Specified by:
getAllAssociatedLocationsin interfaceITrace- Parameters:
uri- the expected target resource. May not benull.- Returns:
- all locations. Never
null.
-
-