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 and Type | Field and Description |
|---|---|
static String |
DIAGNOSTIC_SOURCE
The value for diagnostics coming from EMF compare.
|
| 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. |
public static final String DIAGNOSTIC_SOURCE
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.DefaultComparisonScopepublic Comparison compare(IComparisonScope scope)
scope.scope - the scope to compare.public Comparison compare(IComparisonScope scope, Monitor monitor)
monitor.scope - the scope to compare, must not be null.monitor - the monitor to report progress to, must not be null. done() will be called
on it. If the monitor is cancelled, the result may be null (in rare cases) or
contain a Diagnostic that indicates cancellation. Note: The given monitor is expected
to use 10 ticks for 100%.ComparisonCanceledException - If the comparison is cancelled at any time.public static EMFCompare.Builder builder()
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.