public final class ComparisonScopeBuilder extends Object
A single file is not always a single EMF model, nor is an EMF model always stored in a single file. This will be used to resolve all physical resources composing the logical model we are to compare, minimize this set to the potential changed candidates, and construct the actual comparison scope.
Constructor and Description |
---|
ComparisonScopeBuilder(IModelResolver resolver,
IModelMinimizer minimizer)
Constructs a builder given its model resolver and minimizer.
|
ComparisonScopeBuilder(IModelResolver resolver,
IModelMinimizer minimizer,
IStorageProviderAccessor storageAccessor)
Constructs a builder given its model resolver and minimizer, along with the storage accessor for remote
data.
|
Modifier and Type | Method and Description |
---|---|
IComparisonScope |
build(org.eclipse.compare.ITypedElement left,
org.eclipse.compare.ITypedElement right,
org.eclipse.core.runtime.IProgressMonitor monitor)
Builds a comparison scope from the given two starting elements.
|
IComparisonScope |
build(org.eclipse.compare.ITypedElement left,
org.eclipse.compare.ITypedElement right,
org.eclipse.compare.ITypedElement origin,
org.eclipse.core.runtime.IProgressMonitor monitor)
Builds a comparison scope from the given starting elements.
|
static IComparisonScope |
create(org.eclipse.compare.ICompareContainer container,
org.eclipse.compare.ITypedElement left,
org.eclipse.compare.ITypedElement right,
org.eclipse.compare.ITypedElement origin,
org.eclipse.core.runtime.IProgressMonitor monitor)
Constructs the comparison scope corresponding to the given typed elements.
|
static IComparisonScope |
create(SynchronizationModel synchronizationModel,
org.eclipse.core.runtime.IProgressMonitor monitor)
Creates the comparison scope corresponding to the given synchronization model, with no further
operation on it.
|
public ComparisonScopeBuilder(IModelResolver resolver, IModelMinimizer minimizer)
resolver
- The resolver we'll use to resolve the logical models of this scope.minimizer
- The minimizer that will be use to reduce the comparison scope before construction.public ComparisonScopeBuilder(IModelResolver resolver, IModelMinimizer minimizer, IStorageProviderAccessor storageAccessor)
resolver
- The resolver we'll use to resolve the logical models of this scope.minimizer
- The minimizer that will be use to reduce the comparison scope before construction.storageAccessor
- The storage accessor we'll use to access remote resource variants. May be null
,
in which case we'll only use local content.public IComparisonScope build(org.eclipse.compare.ITypedElement left, org.eclipse.compare.ITypedElement right, org.eclipse.core.runtime.IProgressMonitor monitor)
left
- The element that will be used as the starting point to resolve the left logical model.right
- Element that will be used as the starting point to resolve the left logical model.monitor
- The monitor on which to report progress information to the user.public IComparisonScope build(org.eclipse.compare.ITypedElement left, org.eclipse.compare.ITypedElement right, org.eclipse.compare.ITypedElement origin, org.eclipse.core.runtime.IProgressMonitor monitor)
left
- The element that will be used as the starting point to resolve the left logical model.right
- Element that will be used as the starting point to resolve the left logical model.origin
- The origin resource, starting point of the logical model we are to resolve as the origin
one. Can be null
.monitor
- The monitor on which to report progress information to the user.public static IComparisonScope create(org.eclipse.compare.ICompareContainer container, org.eclipse.compare.ITypedElement left, org.eclipse.compare.ITypedElement right, org.eclipse.compare.ITypedElement origin, org.eclipse.core.runtime.IProgressMonitor monitor)
left
- Left of the compared elements.right
- Right of the compared elements.origin
- Common ancestor of the left
and right
compared elements.monitor
- Monitor to report progress on.public static IComparisonScope create(SynchronizationModel synchronizationModel, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.OperationCanceledException
This internal API is only intended for use by the resource mapping mergers and is not meant to be referenced.
synchronizationModel
- The synchronization model describing the traversals for which a comparison scope is needed.monitor
- Monitor on which to report progress information to the user.org.eclipse.core.runtime.OperationCanceledException
- if the user cancels (or has already canceled) the operation through the given
monitor
.
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.