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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLocalStoragegetLocalLanguage, getLocalURI, getSrcRelativeLocalURI, hasTraceDataprotected 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 AbstractTracejava.io.IOExceptionprotected abstract java.io.InputStream getContents(SourceRelativeURI uri, org.eclipse.core.resources.IProject project) throws java.io.IOException
java.io.IOExceptionprotected java.io.Reader getContentsAsText(SourceRelativeURI uri) throws java.io.IOException
getContentsAsText in class AbstractTracejava.io.IOExceptionprotected abstract java.io.Reader getContentsAsText(SourceRelativeURI uri, org.eclipse.core.resources.IProject projectConfig) throws java.io.IOException
java.io.IOExceptionprotected java.io.Reader getLocalContentsAsText()
throws java.io.IOException
getLocalContentsAsText in class AbstractTracejava.io.IOExceptionprotected abstract java.io.Reader getLocalContentsAsText(org.eclipse.core.resources.IProject project)
throws java.io.IOException
java.io.IOExceptionpublic ILocationInEclipseResource getBestAssociatedLocation(ITextRegion region, org.eclipse.core.resources.IStorage associatedStorage)
IPlatformSpecificTracelocation 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)
IPlatformSpecificTracegetAllAssociatedLocations 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)
IPlatformSpecificTracelocations 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)
ITracelocation 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 ITracegetBestAssociatedLocation in class AbstractTraceregion - the region in the current resource. May not be null.null if none.protected ILocationInEclipseResource createLocationInResource(ITextRegionWithLineInformation region, SourceRelativeURI srcRelativePath)
createLocationInResource in class AbstractTracepublic java.lang.Iterable<? extends ILocationInEclipseResource> getAllAssociatedLocations(ITextRegion localRegion)
ITracelocations that match the given region.getAllAssociatedLocations in interface IPlatformSpecificTrace<org.eclipse.core.resources.IStorage,ILocationInEclipseResource>getAllAssociatedLocations in interface ITracegetAllAssociatedLocations in class AbstractTracelocalRegion - the region in the current resource. May not be null.null.public ILocationInEclipseResource getBestAssociatedLocation(ITextRegion localRegion, AbsoluteURI uri)
ITracelocation 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 ITracegetBestAssociatedLocation in class AbstractTracelocalRegion - 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)
ITracelocations that match the given localRegion
for the expected absoluteTargetResource.getAllAssociatedLocations in interface IPlatformSpecificTrace<org.eclipse.core.resources.IStorage,ILocationInEclipseResource>getAllAssociatedLocations in interface ITracegetAllAssociatedLocations in class AbstractTracelocalRegion - 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)
ITracelocations that were produced from the associated resource in the
given absoluteTargetResource.getAllAssociatedLocations in interface IPlatformSpecificTrace<org.eclipse.core.resources.IStorage,ILocationInEclipseResource>getAllAssociatedLocations in interface ITracegetAllAssociatedLocations in class AbstractTraceuri - the expected target resource. May not be null.null.public IProjectConfig getLocalProjectConfig()
ITracenull.getLocalProjectConfig in interface ITracegetLocalProjectConfig in class AbstractTracenull.public abstract org.eclipse.core.resources.IProject getLocalProject()
public java.lang.Iterable<? extends ILocationInEclipseResource> getAllAssociatedLocations()
ITracelocations.getAllAssociatedLocations in interface IPlatformSpecificTrace<org.eclipse.core.resources.IStorage,ILocationInEclipseResource>getAllAssociatedLocations in interface ITracegetAllAssociatedLocations in class AbstractTracenull.