public class FeatureFilter extends Object
FeatureFilter
s will be used by the default implemention of a diff engine in order to determine
which features it is to check for differences. Any feature that is not returned by this filter will be
ignored by the diff engine.Constructor and Description |
---|
FeatureFilter() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkForOrderingChanges(EStructuralFeature feature)
Tells the diff engine whether the given feature should be checked for changed in the ordering or not.
|
Iterator<EAttribute> |
getAttributesToCheck(Match match)
The diff engine expects this to return the set of attributes that need to be checked for differences
for the given
Match element. |
Iterator<EReference> |
getReferencesToCheck(Match match)
The diff engine expects this to return the set of references that need to be checked for differences
for the given
Match element. |
protected boolean |
isIgnoredAttribute(EAttribute attribute)
This will be used by
getAttributesToCheck(Match) in order to determine whether a given
attribute should be ignored. |
protected boolean |
isIgnoredReference(Match match,
EReference reference)
This will be used by
getReferencesToCheck(Match) in order to determine whether a given
reference should be ignored. |
protected boolean |
referenceIsSet(EReference reference,
Match match)
Checks whether the given reference is set on at least one of the three sides of the given match.
|
public Iterator<EReference> getReferencesToCheck(Match match)
Match
element.
This default implementation assumes that all three sides of the match are conform to the same
metamodel, and simply returns one of the side's side.eClass().getEAllReferences()
, ignoring only the derived and container.
match
- The match for which we are trying to compute differences.match
's references.public Iterator<EAttribute> getAttributesToCheck(Match match)
Match
element.
This default implementation assumes that all three sides of the match are conform to the same
metamodel, and simply returns one of the side's side.eClass().getEAllAttributes()
, ignoring only the derived.
match
- The match for which we are trying to compute differences.match
's attributes.public boolean checkForOrderingChanges(EStructuralFeature feature)
feature
- The feature we are currently checking.true
if the diff engine should consider the ordering of this feature,
false
otherwise.protected boolean referenceIsSet(EReference reference, Match match)
reference
- The reference we need to be set.match
- The match for which values we need to check the given reference.true
if the given reference is set on at least one of the three sides of the given
match.protected boolean isIgnoredReference(Match match, EReference reference)
getReferencesToCheck(Match)
in order to determine whether a given
reference should be ignored.match
- The match from which was taken that particular reference.reference
- The candidate that might be ignored.true
if that reference should be ignored by the comparison engine.protected boolean isIgnoredAttribute(EAttribute attribute)
getAttributesToCheck(Match)
in order to determine whether a given
attribute should be ignored.attribute
- The candidate that might be ignored.true
if that attribute should be ignored by the comparison engine.
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.