public class DiffBuilder extends Object implements IDiffProcessor
IDiffProcessor
will build the necessary differences and attach
them to the appropriate Match
.Constructor and Description |
---|
DiffBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
attributeChange(Match match,
EAttribute attribute,
Object value,
DifferenceKind kind,
DifferenceSource source)
This will be called whenever the diff engine detected a difference for a given attribute value.
|
void |
featureMapChange(Match match,
EAttribute attribute,
Object value,
DifferenceKind kind,
DifferenceSource source)
This will be called whenever the diff engine detected a difference for a given attribute value.
|
void |
referenceChange(Match match,
EReference reference,
EObject value,
DifferenceKind kind,
DifferenceSource source)
This will be called whenever the Diff engine detected a difference for a given reference value.
|
void |
resourceAttachmentChange(Match match,
String uri,
DifferenceKind kind,
DifferenceSource source)
This will be called whenever the diff engine detected the addition (or removal) of a root in a given
Resource.
|
public void referenceChange(Match match, EReference reference, EObject value, DifferenceKind kind, DifferenceSource source)
referenceChange
in interface IDiffProcessor
match
- The match to which this difference should be attached.reference
- The reference on which we detected a difference.value
- The actual value for which we detected a difference.kind
- Kind of the detected difference.source
- Source of the detected difference. For two way comparisons, this will always be
DifferenceSource.LEFT
. Otherwise, this will indicate the side on which this
difference has been detected.IDiffProcessor.referenceChange(org.eclipse.emf.compare.Match,
org.eclipse.emf.ecore.EReference, org.eclipse.emf.ecore.EObject,
org.eclipse.emf.compare.DifferenceKind, org.eclipse.emf.compare.DifferenceSource)
public void attributeChange(Match match, EAttribute attribute, Object value, DifferenceKind kind, DifferenceSource source)
attributeChange
in interface IDiffProcessor
match
- The match to which this difference should be attached.attribute
- The attribute on which we detected a difference.value
- The actual value for which we detected a difference.kind
- Kind of the difference.source
- Source of the difference. For two way comparisons, this will always be
DifferenceSource.LEFT
. Otherwise, this will indicate the side on which this
difference has been detected.IDiffProcessor.attributeChange(org.eclipse.emf.compare.Match,
org.eclipse.emf.ecore.EAttribute, java.lang.Object, org.eclipse.emf.compare.DifferenceKind,
org.eclipse.emf.compare.DifferenceSource)
public void featureMapChange(Match match, EAttribute attribute, Object value, DifferenceKind kind, DifferenceSource source)
featureMapChange
in interface IDiffProcessor
match
- The match to which this difference should be attached.attribute
- The EFeatureMapEntry attribute on which we detected a difference.value
- The actual FeatureMap.Entry value for which we detected a difference.kind
- Kind of the difference.source
- Source of the difference. For two way comparisons, this will always be
DifferenceSource.LEFT
. Otherwise, this will indicate the side on which this
difference has been detected.IDiffProcessor.featureMapChange(org.eclipse.emf.compare.Match,
org.eclipse.emf.ecore.EAttribute, java.lang.Object, org.eclipse.emf.compare.DifferenceKind,
org.eclipse.emf.compare.DifferenceSource)
public void resourceAttachmentChange(Match match, String uri, DifferenceKind kind, DifferenceSource source)
resourceAttachmentChange
in interface IDiffProcessor
match
- The match to which this difference should be attached.uri
- The uri of the resource we attached this element to in case of an DifferenceKind.ADD
, or the uri of the resource it was attached to in case of a DifferenceKind.DELETE
difference.kind
- Kind of this difference.source
- Source of the difference. For two way comparisons, this will always be
DifferenceSource.LEFT
. Otherwise, this will indicate the side on which this
difference has been detected.IDiffProcessor.resourceAttachmentChange(org.eclipse.emf.compare.Match,
java.lang.String, org.eclipse.emf.compare.DifferenceKind,
org.eclipse.emf.compare.DifferenceSource)
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.