public class EMFCompare extends Object
EMFCompare.builder().build().compare(EMFCompare.createDefaultScope(left, right, origin))
.
When in need of a more customized comparison, the API can be used through chained calls. For example, if
you need to compare two notifiers (left
and right
) while ignoring their identifiers, with a
given progress monitor (call it progress
), you can do so through :
EMFCompare.builder().setMatchEngine(DefaultMatchEngine.create(UseIdentifiers.NEVER)).build().compare(EMFCompare.createDefaultScope(left, right), new BasicMonitor())
.
Modifier and Type | Class and Description |
---|---|
static class |
EMFCompare.Builder
A Builder pattern to instantiate EMFCompare objects.
|
Modifier | Constructor and Description |
---|---|
protected |
EMFCompare(IMatchEngine.Factory.Registry matchEngineFactoryRegistry,
IDiffEngine diffEngine,
IReqEngine reqEngine,
IEquiEngine equiEngine,
IConflictDetector conflictDetector,
IPostProcessor.Descriptor.Registry<?> postProcessorFactoryRegistry)
Creates a new EMFCompare object able to compare Notifier with the help of given engines.
|
Modifier and Type | Method and Description |
---|---|
static EMFCompare.Builder |
builder()
Creates a new builder to configure the creation of a new EMFCompare object.
|
Comparison |
compare(IComparisonScope scope)
Computes and returns a new Comparison object representation the differences between Notifier in the
give
scope . |
Comparison |
compare(IComparisonScope scope,
Monitor monitor)
Launches the comparison with the given scope and reporting progress to the given
monitor . |
static IComparisonScope |
createDefaultScope(Notifier left,
Notifier right)
Deprecated.
this was only a delegation to the publicly accessible
DefaultComparisonScope ... it
will be removed in a subsequent release. |
static IComparisonScope |
createDefaultScope(Notifier left,
Notifier right,
Notifier origin)
Deprecated.
this was only a delegation to the publicly accessible
DefaultComparisonScope ... it
will be removed in a subsequent release. |
protected EMFCompare(IMatchEngine.Factory.Registry matchEngineFactoryRegistry, IDiffEngine diffEngine, IReqEngine reqEngine, IEquiEngine equiEngine, IConflictDetector conflictDetector, IPostProcessor.Descriptor.Registry<?> postProcessorFactoryRegistry)
matchEngineFactoryRegistry
- IMatchEngine.Factory.Registry
to use to find a match engine factory to compute
comparisondiffEngine
- IDiffEngine to use to compute comparisonreqEngine
- IReqEngine to use to compute comparisonequiEngine
- IEquiEngine to use to compute comparisonconflictDetector
- IConflictDetector to use to compute comparisonpostProcessorFactoryRegistry
- PostProcessorRegistry to use to find an IPostProcessor@Deprecated public static IComparisonScope createDefaultScope(Notifier left, Notifier right)
DefaultComparisonScope
... it
will be removed in a subsequent release.The default comparison scope covers all proper content of the given notifiers, i.e any element contained directly under that notifier.
left
- The left notifier of this scope.right
- The right notifier of this scope.DefaultComparisonScope
@Deprecated public static IComparisonScope createDefaultScope(Notifier left, Notifier right, Notifier origin)
DefaultComparisonScope
... it
will be removed in a subsequent release.The default comparison scope covers all proper content of the given notifiers, i.e any element contained directly under that notifier.
left
- The left notifier of this scope.right
- The right notifier of this scope.origin
- The common ancestor of left
and right
.DefaultComparisonScope
public Comparison compare(IComparisonScope scope)
scope
.scope
- the scope to compare.public Comparison compare(IComparisonScope scope, Monitor monitor)
monitor
.scope
- the scope to compare.monitor
- the monitor to report progress to.public static EMFCompare.Builder builder()
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.