aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2012-03-19 15:05:38 (EDT)
committerKenn Hussey2012-03-23 17:00:42 (EDT)
commitd23f1efe8a606c668ba8979b5894c647cb27d6e3 (patch)
treeb8ae53fef5ba591c78e7d3b9fef3e6e8d6a3841f
parenta888d1254d98d0c73d9eaf79ad4e731952d09586 (diff)
downloadorg.eclipse.uml2-d23f1efe8a606c668ba8979b5894c647cb27d6e3.zip
org.eclipse.uml2-d23f1efe8a606c668ba8979b5894c647cb27d6e3.tar.gz
org.eclipse.uml2-d23f1efe8a606c668ba8979b5894c647cb27d6e3.tar.bz2
Initialize constraint enablement from preference store.
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/validation/DelegatingConstraintDescriptor.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/validation/DelegatingConstraintDescriptor.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/validation/DelegatingConstraintDescriptor.java
index 751bd5d..2e56c5a 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/validation/DelegatingConstraintDescriptor.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/validation/DelegatingConstraintDescriptor.java
@@ -13,8 +13,11 @@ package org.eclipse.uml2.uml.validation;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EValidator;
import org.eclipse.emf.validation.model.ConstraintSeverity;
import org.eclipse.emf.validation.model.EvaluationMode;
+import org.eclipse.emf.validation.preferences.EMFModelValidationPreferences;
import org.eclipse.emf.validation.service.AbstractConstraintDescriptor;
import org.eclipse.uml2.uml.UMLPlugin;
@@ -57,6 +60,9 @@ class DelegatingConstraintDescriptor
.append(target.getName());
buf.append('.').append(name);
this.id = buf.toString();
+
+ // this public method call is safe because it's final in my superclass
+ setEnabled(!EMFModelValidationPreferences.isConstraintDisabled(this.id));
}
public String getName() {