|
||||||||||
| 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.AttributesCheck
public class AttributesCheck
This will implement the attribute checks : order of attribute values, changes between two versions, ...
| Field Summary |
|---|
| Fields inherited from class org.eclipse.emf.compare.diff.engine.check.AbstractCheck |
|---|
ANCESTOR_OBJECT, LEFT_OBJECT, RIGHT_OBJECT |
| Constructor Summary | |
|---|---|
AttributesCheck(org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer referencer)
Simply delegates to the super constructor. |
|
| Method Summary | |
|---|---|
protected boolean |
areDistinctValues(java.lang.Object left,
java.lang.Object right)
This will be used internaly to check that an attribute's values have changed from one version to the other. |
protected boolean |
attributeListContains(java.util.List<java.lang.Object> values,
java.lang.Object value)
This can be used to check that the given list contains the given value. |
void |
checkAttributesUpdates(DiffGroup root,
Match2Elements mapping)
This will iterate through all the attributes of the mapping's two elements to check if any
of them has been modified. |
void |
checkAttributesUpdates(DiffGroup root,
Match3Elements mapping)
This will iterate through all the attributes of the mapping's three elements to check if
any of them has been modified. |
protected void |
checkAttributeUpdates(DiffGroup root,
Match2Elements mapping,
org.eclipse.emf.ecore.EAttribute attribute)
This will check that the values of the given attribute from the objects contained by mapping has been modified. |
protected void |
checkAttributeUpdates(DiffGroup root,
Match3Elements mapping,
org.eclipse.emf.ecore.EAttribute attribute)
This will check that the values of the given attribute from the objects contained by mapping has been modified. |
protected boolean |
shouldBeIgnored(org.eclipse.emf.ecore.EAttribute attribute)
Determines if we should ignore an attribute for diff detection. |
| Methods inherited from class org.eclipse.emf.compare.diff.engine.check.AbstractCheck |
|---|
convertFeatureMapList, getMatchedEObject, getMatchedEObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AttributesCheck(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 checkAttributesUpdates(DiffGroup root,
Match2Elements mapping)
throws FactoryException
mapping's two elements to check if any
of them has been modified.
root - root of the DiffElement to create if one of the attributes has
actually been changed.mapping - This contains the mapping information about the elements we need to check.
FactoryException - Thrown if one of the checks fails.
public void checkAttributesUpdates(DiffGroup root,
Match3Elements mapping)
throws FactoryException
mapping's three elements to check if
any of them has been modified.
root - root of the DiffElement to create if one of the attribute has
actually been changed.mapping - This contains the mapping information about the elements we need to check for a move.
FactoryException - Thrown if one of the checks fails.
protected boolean areDistinctValues(java.lang.Object left,
java.lang.Object right)
Specifically, this will check for :
null.
left - The value of the attribute from the left compare resource.right - The value of the attribute from the right compare resource.
true if the left value is distinct from the right value.
protected final boolean attributeListContains(java.util.List<java.lang.Object> values,
java.lang.Object value)
areDistinctValues(Object, Object).
values - The list we need to check for a value equivalent to value.value - The value we need to know if it's contained by values.
true if areDistinctValues(Object, Object) returned true for one of the
objects contained by values when compared with value.
protected void checkAttributeUpdates(DiffGroup root,
Match2Elements mapping,
org.eclipse.emf.ecore.EAttribute attribute)
throws FactoryException
root - root of the DiffElement to create if one of the attributes has
actually been changed.mapping - This contains the mapping information about the elements we need to check.attribute - The attribute we need to check for differences.
FactoryException - Thrown if one of the checks fails.
protected void checkAttributeUpdates(DiffGroup root,
Match3Elements mapping,
org.eclipse.emf.ecore.EAttribute attribute)
throws FactoryException
root - root of the DiffElement to create if one of the attributes has
actually been changed.mapping - This contains the mapping information about the elements we need to check.attribute - The attribute we need to check for differences.
FactoryException - Thrown if one of the checks fails.protected boolean shouldBeIgnored(org.eclipse.emf.ecore.EAttribute attribute)
Default is to ignore attributes marked either
Clients should override this if they wish to ignore other attributes.
attribute - Attribute to determine whether it should be ignored.
True if attribute 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 | |||||||||