|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.compare.diff.engine.check.AbstractCheck
org.eclipse.emf.compare.diff.engine.check.ReferencesCheck
public class ReferencesCheck
This will implement the reference checks : order of reference values, changes between two versions, ...
Field Summary |
---|
Fields inherited from class org.eclipse.emf.compare.diff.engine.check.AbstractCheck |
---|
ANCESTOR_OBJECT, crossReferencer, LEFT_OBJECT, RIGHT_OBJECT |
Constructor Summary | |
---|---|
ReferencesCheck(org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer referencer)
Simply delegates to the super constructor. |
Method Summary | |
---|---|
protected void |
checkContainmentReferenceOrderChange(DiffGroup root,
Match2Elements mapping,
org.eclipse.emf.ecore.EReference reference)
This will be called to check for ordering changes on a given containment reference values. |
protected void |
checkReferenceOrderChange(DiffGroup root,
org.eclipse.emf.ecore.EReference reference,
org.eclipse.emf.ecore.EObject leftElement,
org.eclipse.emf.ecore.EObject rightElement,
java.util.List<ReferenceChangeLeftTarget> addedReferences,
java.util.List<ReferenceChangeRightTarget> removedReferences)
This will be called to check for changes on a given reference values. |
void |
checkReferencesUpdates(DiffGroup root,
Match2Elements mapping)
Checks if there's been references updates in the model. |
void |
checkReferencesUpdates(DiffGroup root,
Match3Elements mapping)
Checks if there's been references updates in the model. |
protected void |
checkReferenceUpdates(DiffGroup root,
Match2Elements mapping,
org.eclipse.emf.ecore.EReference reference)
This will check that the values of the given reference from the objects contained by mapping has been modified. |
protected void |
checkReferenceUpdates(DiffGroup root,
Match3Elements mapping,
org.eclipse.emf.ecore.EReference reference)
This will check that the values of the given reference from the objects contained by mapping has been modified. |
protected boolean |
shouldBeIgnored(org.eclipse.emf.ecore.EReference reference)
Determines if we should ignore a reference for diff detection. |
Methods inherited from class org.eclipse.emf.compare.diff.engine.check.AbstractCheck |
---|
convertFeatureMapList, getMatchedEObject, getMatchedEObject, isUnmatched |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReferencesCheck(org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer referencer)
referencer
- CrossReferencer instantiated with the match model or match resource set.AbstractCheck#DefaultCheck(org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer)}
Method Detail |
---|
public void checkReferencesUpdates(DiffGroup root, Match2Elements mapping) throws FactoryException
A reference is considered updated if its value(s) has been changed (either removal or addition of an element if the reference is multi-valued or update of a single-valued reference) between the left and the right model.
root
- root
of the DiffElement
to create.mapping
- Contains informations about the left and right model elements we have to compare.
FactoryException
- Thrown if we cannot fetch the references' values.public void checkReferencesUpdates(DiffGroup root, Match3Elements mapping) throws FactoryException
A reference is considered updated if its value(s) has been changed (either removal or addition of an element if the reference is multi-valued or update of a single-valued reference) between the left and the ancestor model, the right and the ancestor or between the left and the right model.
root
- root
of the DiffElement
to create.mapping
- Contains informations about the left, right and origin model elements we have to compare.
FactoryException
- Thrown if we cannot fetch the references' values.protected void checkContainmentReferenceOrderChange(DiffGroup root, Match2Elements mapping, org.eclipse.emf.ecore.EReference reference) throws FactoryException
root
- Root
of the DiffElement
s to create.mapping
- Contains informations about the left and right model elements we have to compare.reference
- EReference
to check for modifications.
FactoryException
- Thrown if we cannot fetch the references' values.protected void checkReferenceOrderChange(DiffGroup root, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EObject leftElement, org.eclipse.emf.ecore.EObject rightElement, java.util.List<ReferenceChangeLeftTarget> addedReferences, java.util.List<ReferenceChangeRightTarget> removedReferences) throws FactoryException
reference.isMany()
and reference.isOrdered()
always return true here for the
generic diff engine and the tests won't be made.
root
- Root
of the DiffElement
s to create.reference
- EReference
to check for modifications.leftElement
- Element corresponding to the final holder of the given reference.rightElement
- Element corresponding to the initial holder of the given reference.addedReferences
- Contains the created differences for added reference values.removedReferences
- Contains the created differences for removed reference values.
FactoryException
- Thrown if we cannot fetch the references' values.protected void checkReferenceUpdates(DiffGroup root, Match2Elements mapping, org.eclipse.emf.ecore.EReference reference) throws FactoryException
root
- root
of the DiffElement
to create.mapping
- Contains informations about the left and right model elements we have to compare.reference
- The reference we need to check for differences.
FactoryException
- Thrown if one of the checks fails.protected void checkReferenceUpdates(DiffGroup root, Match3Elements mapping, org.eclipse.emf.ecore.EReference reference) throws FactoryException
root
- root
of the DiffElement
to create.mapping
- Contains informations about the left and right model elements we have to compare.reference
- The reference we need to check for differences.
FactoryException
- Thrown if one of the checks fails.protected boolean shouldBeIgnored(org.eclipse.emf.ecore.EReference reference)
Default is to ignore references marked either
Clients should override this if they wish to ignore other references.
reference
- Reference to determine whether it should be ignored.
True
if reference has to be ignored, False
otherwise.
|
Copyright 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |