public abstract class AbstractEclipseTrace extends AbstractTrace implements IEclipseTrace
AbstractTrace.TraceAccess, AbstractTrace.TraceRegionsByURI
Constructor and Description |
---|
AbstractEclipseTrace() |
Modifier and Type | Method and Description |
---|---|
protected ILocationInEclipseResource |
createLocationInResource(ITextRegionWithLineInformation region,
SourceRelativeURI srcRelativePath) |
protected org.eclipse.core.resources.IProject |
findProject(java.lang.String projectName) |
protected abstract org.eclipse.core.resources.IStorage |
findStorage(SourceRelativeURI srcRelativeLocation,
org.eclipse.core.resources.IProject project) |
java.lang.Iterable<? extends ILocationInEclipseResource> |
getAllAssociatedLocations()
Returns all known associated
locations . |
java.lang.Iterable<? extends ILocationInEclipseResource> |
getAllAssociatedLocations(AbsoluteURI uri)
Returns all known
locations that were produced from the associated resource in the
given absoluteTargetResource . |
java.lang.Iterable<? extends ILocationInEclipseResource> |
getAllAssociatedLocations(org.eclipse.core.resources.IStorage associatedStorage)
Returns all known
locations that were produced from the associated resource
in the given targetResource . |
java.lang.Iterable<? extends ILocationInEclipseResource> |
getAllAssociatedLocations(ITextRegion localRegion)
Returns all associated
locations that match the given region . |
java.lang.Iterable<? extends ILocationInEclipseResource> |
getAllAssociatedLocations(ITextRegion localRegion,
AbsoluteURI uri)
Returns all individual
locations that match the given localRegion
for the expected absoluteTargetResource . |
java.lang.Iterable<? extends ILocationInEclipseResource> |
getAllAssociatedLocations(ITextRegion localRegion,
org.eclipse.core.resources.IStorage associatedStorage)
|
ILocationInEclipseResource |
getBestAssociatedLocation(ITextRegion region)
Returns the best associated
location that matches the given region . |
ILocationInEclipseResource |
getBestAssociatedLocation(ITextRegion localRegion,
AbsoluteURI uri)
|
ILocationInEclipseResource |
getBestAssociatedLocation(ITextRegion region,
org.eclipse.core.resources.IStorage associatedStorage)
|
protected java.io.InputStream |
getContents(SourceRelativeURI uri) |
protected abstract java.io.InputStream |
getContents(SourceRelativeURI uri,
org.eclipse.core.resources.IProject project) |
protected java.io.Reader |
getContentsAsText(SourceRelativeURI uri) |
protected abstract java.io.Reader |
getContentsAsText(SourceRelativeURI uri,
org.eclipse.core.resources.IProject projectConfig) |
protected java.io.Reader |
getLocalContentsAsText() |
protected abstract java.io.Reader |
getLocalContentsAsText(org.eclipse.core.resources.IProject project) |
abstract org.eclipse.core.resources.IProject |
getLocalProject() |
IProjectConfig |
getLocalProjectConfig()
Returns the local project.
|
protected IStorage2UriMapper |
getStorage2uriMapper() |
protected AbsoluteURI |
getURIForStorage(org.eclipse.core.resources.IStorage storage) |
protected org.eclipse.core.resources.IWorkspace |
getWorkspace() |
createLocationInResourceFor, doGetRootTraceRegion, encloses, encloses, findLanguage, findParentByURI, findTraceRegionAt, findTraceRegionAtLeftOffset, findTraceRegionAtRightOffset, getAllTraceRegions, getAllTraceRegions, getLocalLanguage, getLocalURI, getMergedLocationInResource, getRootTraceRegion, getService, getSrcRelativeLocalURI, getTraceRegionProvider, hasTraceData, isAssociatedWith, isTraceToSource, isTraceToTarget, mergeRegions, resolvePath, setTraceRegionProvider, setTraceToSource, toLocations, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLocalStorage
getLocalLanguage, getLocalURI, getSrcRelativeLocalURI, hasTraceData
protected org.eclipse.core.resources.IProject findProject(java.lang.String projectName)
protected org.eclipse.core.resources.IWorkspace getWorkspace()
protected IStorage2UriMapper getStorage2uriMapper()
protected AbsoluteURI getURIForStorage(org.eclipse.core.resources.IStorage storage)
protected abstract org.eclipse.core.resources.IStorage findStorage(SourceRelativeURI srcRelativeLocation, org.eclipse.core.resources.IProject project)
protected java.io.InputStream getContents(SourceRelativeURI uri) throws java.io.IOException
getContents
in class AbstractTrace
java.io.IOException
protected abstract java.io.InputStream getContents(SourceRelativeURI uri, org.eclipse.core.resources.IProject project) throws java.io.IOException
java.io.IOException
protected java.io.Reader getContentsAsText(SourceRelativeURI uri) throws java.io.IOException
getContentsAsText
in class AbstractTrace
java.io.IOException
protected abstract java.io.Reader getContentsAsText(SourceRelativeURI uri, org.eclipse.core.resources.IProject projectConfig) throws java.io.IOException
java.io.IOException
protected java.io.Reader getLocalContentsAsText() throws java.io.IOException
getLocalContentsAsText
in class AbstractTrace
java.io.IOException
protected abstract java.io.Reader getLocalContentsAsText(org.eclipse.core.resources.IProject project) throws java.io.IOException
java.io.IOException
public ILocationInEclipseResource getBestAssociatedLocation(ITextRegion region, org.eclipse.core.resources.IStorage associatedStorage)
IPlatformSpecificTrace
location
that matches the given
sourceRegion
in the targetResource
.
If the region does not match a single location in the target, the following strategy applies:
targetResource
is returned.
sourceRegion
does not yield
a location in targetResource
, returns null
.getBestAssociatedLocation
in interface IPlatformSpecificTrace<org.eclipse.core.resources.IStorage,ILocationInEclipseResource>
region
- the region in the current resource. May not be null
.associatedStorage
- the expected target resource. May not be null
.null
if none.public java.lang.Iterable<? extends ILocationInEclipseResource> getAllAssociatedLocations(ITextRegion localRegion, org.eclipse.core.resources.IStorage associatedStorage)
IPlatformSpecificTrace
getAllAssociatedLocations
in interface IPlatformSpecificTrace<org.eclipse.core.resources.IStorage,ILocationInEclipseResource>
localRegion
- the region in the current resource. May not be null
.associatedStorage
- the expected target resource. May not be null
.null
.public java.lang.Iterable<? extends ILocationInEclipseResource> getAllAssociatedLocations(org.eclipse.core.resources.IStorage associatedStorage)
IPlatformSpecificTrace
locations
that were produced from the associated resource
in the given targetResource
.getAllAssociatedLocations
in interface IPlatformSpecificTrace<org.eclipse.core.resources.IStorage,ILocationInEclipseResource>
associatedStorage
- the expected target resource. May not be null
.null
.public ILocationInEclipseResource getBestAssociatedLocation(ITextRegion region)
ITrace
location
that matches the given region
.
If the region does not match a single location, the following strategy applies:
null
is returned.
null
.getBestAssociatedLocation
in interface IPlatformSpecificTrace<org.eclipse.core.resources.IStorage,ILocationInEclipseResource>
getBestAssociatedLocation
in interface ITrace
getBestAssociatedLocation
in class AbstractTrace
region
- the region in the current resource. May not be null
.null
if none.protected ILocationInEclipseResource createLocationInResource(ITextRegionWithLineInformation region, SourceRelativeURI srcRelativePath)
createLocationInResource
in class AbstractTrace
public java.lang.Iterable<? extends ILocationInEclipseResource> getAllAssociatedLocations(ITextRegion localRegion)
ITrace
locations
that match the given region
.getAllAssociatedLocations
in interface IPlatformSpecificTrace<org.eclipse.core.resources.IStorage,ILocationInEclipseResource>
getAllAssociatedLocations
in interface ITrace
getAllAssociatedLocations
in class AbstractTrace
localRegion
- the region in the current resource. May not be null
.null
.public ILocationInEclipseResource getBestAssociatedLocation(ITextRegion localRegion, AbsoluteURI uri)
ITrace
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
.getBestAssociatedLocation
in interface IPlatformSpecificTrace<org.eclipse.core.resources.IStorage,ILocationInEclipseResource>
getBestAssociatedLocation
in interface ITrace
getBestAssociatedLocation
in class AbstractTrace
localRegion
- the region in the current resource. May not be null
.uri
- the expected target resource. May not be null
.null
if none.public java.lang.Iterable<? extends ILocationInEclipseResource> getAllAssociatedLocations(ITextRegion localRegion, AbsoluteURI uri)
ITrace
locations
that match the given localRegion
for the expected absoluteTargetResource
.getAllAssociatedLocations
in interface IPlatformSpecificTrace<org.eclipse.core.resources.IStorage,ILocationInEclipseResource>
getAllAssociatedLocations
in interface ITrace
getAllAssociatedLocations
in class AbstractTrace
localRegion
- the region in the current resource. May not be null
.uri
- the expected target resource. May not be null
.null
.public java.lang.Iterable<? extends ILocationInEclipseResource> getAllAssociatedLocations(AbsoluteURI uri)
ITrace
locations
that were produced from the associated resource in the
given absoluteTargetResource
.getAllAssociatedLocations
in interface IPlatformSpecificTrace<org.eclipse.core.resources.IStorage,ILocationInEclipseResource>
getAllAssociatedLocations
in interface ITrace
getAllAssociatedLocations
in class AbstractTrace
uri
- the expected target resource. May not be null
.null
.public IProjectConfig getLocalProjectConfig()
ITrace
null
.getLocalProjectConfig
in interface ITrace
getLocalProjectConfig
in class AbstractTrace
null
.public abstract org.eclipse.core.resources.IProject getLocalProject()
public java.lang.Iterable<? extends ILocationInEclipseResource> getAllAssociatedLocations()
ITrace
locations
.getAllAssociatedLocations
in interface IPlatformSpecificTrace<org.eclipse.core.resources.IStorage,ILocationInEclipseResource>
getAllAssociatedLocations
in interface ITrace
getAllAssociatedLocations
in class AbstractTrace
null
.