Class AbstractTraceForURIProvider<SomeFile,Trace extends AbstractTrace>
- java.lang.Object
-
- org.eclipse.xtext.generator.trace.internal.AbstractTraceForURIProvider<SomeFile,Trace>
-
- All Implemented Interfaces:
ITraceForURIProvider
public abstract class AbstractTraceForURIProvider<SomeFile,Trace extends AbstractTrace> extends java.lang.Object implements ITraceForURIProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractTraceForURIProvider.CachedTracesprotected static interfaceAbstractTraceForURIProvider.PersistedTrace
-
Constructor Summary
Constructors Constructor Description AbstractTraceForURIProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract SomeFileasFile(AbsoluteURI absoluteURI, IProjectConfig project)Obtain the file representation from the given URI.protected SomeFileasFile(SourceRelativeURI srcRelativeDerivedResource, IProjectConfig project)protected abstract java.util.List<AbstractTraceForURIProvider.PersistedTrace>findInverseTraceFiles(SomeFile sourceFile)Find all the trace files that have been written for the given source file.protected abstract AbstractTraceForURIProvider.PersistedTracefindPersistedTrace(SomeFile generatedFile)Find the persisted trace information for the given generated file.protected abstract AbsoluteURIgetAbsoluteLocation(SomeFile file)Returns the absolute location from the given file representation.protected AbsoluteURIgetGeneratedLocation(AbstractTraceForURIProvider.PersistedTrace trace)Compute the location of the generated file from the given trace file.protected SourceRelativeURIgetGeneratedUriForTrace(IProjectConfig projectConfig, AbsoluteURI absoluteSourceResource, AbsoluteURI generatedFileURI, ITraceURIConverter traceURIConverter)protected abstract IProjectConfiggetProjectConfig(SomeFile sourceFile)Find the project configuration for the given generated file.protected IResourceServiceProvidergetServiceProvider(AbsoluteURI absoluteSourceResource)protected TraceFileNameProvidergetTraceFileNameProvider()TracegetTraceToSource(AbsoluteURI absoluteDerivedResource, IProjectConfig project)Returns the trace information to the sources that were used as input for the given derived resource.TracegetTraceToSource(SourceRelativeURI srcRelativeDerivedResource, IProjectConfig project)Returns the trace information to the sources that were used as input for the given derived resource.TracegetTraceToSource(SomeFile generatedFile)TracegetTraceToTarget(AbsoluteURI absoluteSourceResource, IProjectConfig project)Returns the trace information to the targets that were generated from the given source.TracegetTraceToTarget(SourceRelativeURI srcRelativeSourceResource, IProjectConfig project)Returns the trace information to the targets that were generated from the given source.TracegetTraceToTarget(SomeFile sourceFile, AbsoluteURI absoluteSourceResource, IProjectConfig projectConfig)protected abstract TracenewAbstractTrace(SomeFile file)Instantiate a new instance of the trace and associate the locate information with the given file.
-
-
-
Method Detail
-
newAbstractTrace
protected abstract Trace newAbstractTrace(SomeFile file)
Instantiate a new instance of the trace and associate the locate information with the given file.
-
asFile
protected abstract SomeFile asFile(AbsoluteURI absoluteURI, IProjectConfig project)
Obtain the file representation from the given URI.
-
getAbsoluteLocation
protected abstract AbsoluteURI getAbsoluteLocation(SomeFile file)
Returns the absolute location from the given file representation.
-
asFile
protected SomeFile asFile(SourceRelativeURI srcRelativeDerivedResource, IProjectConfig project)
-
findInverseTraceFiles
protected abstract java.util.List<AbstractTraceForURIProvider.PersistedTrace> findInverseTraceFiles(SomeFile sourceFile)
Find all the trace files that have been written for the given source file.
-
findPersistedTrace
protected abstract AbstractTraceForURIProvider.PersistedTrace findPersistedTrace(SomeFile generatedFile)
Find the persisted trace information for the given generated file.
-
getProjectConfig
protected abstract IProjectConfig getProjectConfig(SomeFile sourceFile)
Find the project configuration for the given generated file.
-
getTraceToSource
public Trace getTraceToSource(AbsoluteURI absoluteDerivedResource, IProjectConfig project)
Description copied from interface:ITraceForURIProviderReturns the trace information to the sources that were used as input for the given derived resource. May returnnullif no such data is available for the given storage.- Specified by:
getTraceToSourcein interfaceITraceForURIProvider- Parameters:
absoluteDerivedResource- the resource whose source trace is requested. May not benull.project- the project that contains the derived resource. May not benull.- Returns:
- the trace to the source or
null.
-
getTraceToSource
public Trace getTraceToSource(SourceRelativeURI srcRelativeDerivedResource, IProjectConfig project)
Description copied from interface:ITraceForURIProviderReturns the trace information to the sources that were used as input for the given derived resource. May returnnullif no such data is available for the given storage.- Specified by:
getTraceToSourcein interfaceITraceForURIProvider- Parameters:
srcRelativeDerivedResource- the resource whose source trace is requested. May not benull.project- the project that contains the derived resource. May not benull.- Returns:
- the trace to the source or
null.
-
getTraceToTarget
public Trace getTraceToTarget(AbsoluteURI absoluteSourceResource, IProjectConfig project)
Description copied from interface:ITraceForURIProviderReturns the trace information to the targets that were generated from the given source. May returnnullif no such data is available for the given storage.- Specified by:
getTraceToTargetin interfaceITraceForURIProvider- Parameters:
absoluteSourceResource- the resource whose target trace is requested. May not benull.project- the project that contains the derived resource. May not benull.- Returns:
- the trace to the generation targets or
null.
-
getTraceToTarget
public Trace getTraceToTarget(SourceRelativeURI srcRelativeSourceResource, IProjectConfig project)
Description copied from interface:ITraceForURIProviderReturns the trace information to the targets that were generated from the given source. May returnnullif no such data is available for the given storage.- Specified by:
getTraceToTargetin interfaceITraceForURIProvider- Parameters:
srcRelativeSourceResource- the resource whose target trace is requested. May not benull.project- the project that contains the resource. May not benull.- Returns:
- the trace to the generation targets or
null.
-
getTraceToTarget
public Trace getTraceToTarget(SomeFile sourceFile, AbsoluteURI absoluteSourceResource, IProjectConfig projectConfig)
-
getGeneratedUriForTrace
protected SourceRelativeURI getGeneratedUriForTrace(IProjectConfig projectConfig, AbsoluteURI absoluteSourceResource, AbsoluteURI generatedFileURI, ITraceURIConverter traceURIConverter)
-
getServiceProvider
protected IResourceServiceProvider getServiceProvider(AbsoluteURI absoluteSourceResource)
-
getGeneratedLocation
protected AbsoluteURI getGeneratedLocation(AbstractTraceForURIProvider.PersistedTrace trace)
Compute the location of the generated file from the given trace file.
-
getTraceFileNameProvider
protected TraceFileNameProvider getTraceFileNameProvider()
-
-