public abstract class AbstractResolution extends Object
Modifier and Type | Field and Description |
---|---|
protected IResolutionContext |
context
The context.
|
protected DiagnosticSupport |
diagnostic
The diagnostic.
|
protected org.apache.log4j.Logger |
logger
The logger
|
protected SubMonitor |
monitor
The monitor.
|
Constructor and Description |
---|
AbstractResolution(IResolutionContext context,
IProgressMonitor monitor)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Set<URI> |
asURISet(Set<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 int |
getTicks()
Number of ticks to allocate to the progress monitor used for reporting progress.
|
protected Set<IStorage> |
resolveTraversal(IFile file,
Set<URI> bounds)
Computes the traversal of the given file, excluding the given bounds if needed.
|
protected final IResolutionContext context
protected final SubMonitor monitor
protected DiagnosticSupport diagnostic
protected final org.apache.log4j.Logger logger
public AbstractResolution(IResolutionContext context, IProgressMonitor monitor)
context
- The resolution context, must not be null
monitor
- The progress monitor, can be null
protected int getTicks()
protected <T> T call(Callable<T> callable) throws InterruptedException
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 runInterruptedException
- If the treatment is interruptedprotected Runnable getFinalizeResolvingRunnable()
Runnable
to run after having resolved resources.protected Set<URI> asURISet(Set<IStorage> storages)
storages
- The storages to transform, must not be null
.URI
s, may be empty but never )null
.protected Set<IStorage> resolveTraversal(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, 2014 Obeo and others. All rights reserved.