Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2012-07-31 14:17:45 +0000
committervlorenzo2012-07-31 14:17:45 +0000
commit39cd38e89690fb1c451ddf02d6910a72fa320598 (patch)
tree39e8de9e0c7c784043e979b7c952eb58439876ff /extraplugins
parentf9e0a7e12d3803f86e865b5c6e1f6f854693da7a (diff)
downloadorg.eclipse.papyrus-39cd38e89690fb1c451ddf02d6910a72fa320598.tar.gz
org.eclipse.papyrus-39cd38e89690fb1c451ddf02d6910a72fa320598.tar.xz
org.eclipse.papyrus-39cd38e89690fb1c451ddf02d6910a72fa320598.zip
386219: [UML Compare] The API should provides the following possibilities
https://bugs.eclipse.org/bugs/show_bug.cgi?id=386219 Improve the class FeaturesCheck
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/check/FeaturesCheck.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/check/FeaturesCheck.java b/extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/check/FeaturesCheck.java
index 45b3ef008e1..c43c699fadd 100644
--- a/extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/check/FeaturesCheck.java
+++ b/extraplugins/uml/compare/org.eclipse.papyrus.infra.emf.compare.diff/src/org/eclipse/papyrus/infra/emf/compare/diff/check/FeaturesCheck.java
@@ -28,7 +28,7 @@ import org.eclipse.papyrus.infra.emf.compare.diff.utils.PapyrusCompareOptions;
* This checker allow to know if differences on a feature should be ignored or not
*
*/
-public class FeaturesCheck extends AbstractCheck implements IFeaturesCheck{
+public class FeaturesCheck extends AbstractCheck implements IFeaturesCheck {
/**
* The list of the features that should be ignored in the whole diff
@@ -85,16 +85,21 @@ public class FeaturesCheck extends AbstractCheck implements IFeaturesCheck{
}
/**
- * This method allows to know if a feature should be ignored in specific case (depends on the eobject)
+ * This method begins by testing the feature must ALWAYS be ignored using shouldBeIgnored(feature).
+ * If not, we verify is the feature should be ignored in some case, depending on its context
+ *
*
* @param feature
- * @param eobject
+ * @param context
* @return
*/
- public boolean shouldBeIgnored(final EStructuralFeature feature, final EObject eobject) {
+ public boolean shouldBeIgnored(final EStructuralFeature feature, final EObject context) {
+ if(shouldBeIgnored(feature)) {
+ return true;
+ }
final List<EObject> values = this.ignoreSomeCase.get(feature);
if(values != null) {
- return values.contains(eobject);
+ return values.contains(context);
}
return false;
}

Back to the top