public abstract class AbstractResolution extends Object
Modifier and Type | Field and Description |
---|---|
protected IResolutionContext |
context
The context.
|
protected DiagnosticSupport |
diagnostic
The diagnostic.
|
protected IImplicitDependencies |
implicitDependencies
The implicit dependencies.
|
protected org.apache.log4j.Logger |
logger
The logger
|
protected org.eclipse.core.runtime.SubMonitor |
monitor
The monitor.
|
Constructor and Description |
---|
AbstractResolution(IResolutionContext context,
org.eclipse.core.runtime.IProgressMonitor monitor)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Set<URI> |
asURISet(Set<org.eclipse.core.resources.IStorage> storages)
|
protected <T> T |
call(Callable<T> callable)
Executes the given callable as soon as there is no other computation running, and automatically runs
"finalization" treatment once the computation is over, whatever its outcome (success or failure).
|
protected Runnable |
getFinalizeResolvingRunnable()
This provides the treatment that is run at the end of the computation, whatever its outcome.
|
protected IImplicitDependencies |
getImplicitDependencies()
Returns the implicit dependencies which can be used to retrieve a set of files that should be part of
the same logical model than a given file.
|
protected int |
getTicks()
Number of ticks to allocate to the progress monitor used for reporting progress.
|
protected Set<org.eclipse.core.resources.IStorage> |
resolveTraversal(org.eclipse.core.resources.IFile file,
Set<URI> bounds)
Computes the traversal of the given file, excluding the given bounds if needed.
|
protected final IResolutionContext context
protected final org.eclipse.core.runtime.SubMonitor monitor
protected DiagnosticSupport diagnostic
protected final org.apache.log4j.Logger logger
protected IImplicitDependencies implicitDependencies
public AbstractResolution(IResolutionContext context, org.eclipse.core.runtime.IProgressMonitor monitor)
context
- The resolution context, must not be null
monitor
- The progress monitor, can be null
protected IImplicitDependencies getImplicitDependencies()
IImplicitDependencies
instance.protected int getTicks()
protected <T> T call(Callable<T> callable)
diagnostic
is instantiated before the computation and should be used thourghout this whole
computation. It will be set to null
before returning, whatever happens.T
- The type of the returned value.callable
- Treatment to runprotected Runnable getFinalizeResolvingRunnable()
Runnable
to run after having resolved resources.protected Set<URI> asURISet(Set<org.eclipse.core.resources.IStorage> storages)
storages
- The storages to transform, must not be null
.URI
s, may be empty but never )null
.protected Set<org.eclipse.core.resources.IStorage> resolveTraversal(org.eclipse.core.resources.IFile file, Set<URI> bounds)
file
- File for which the traversal is neededbounds
- URI to exclude from the logical model computation in case both compared resources are part
of the same logical modelSet
of the file's outgoing and incoming dependencies, never null but possibly empty.
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.