Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2012-03-19 19:05:38 +0000
committerKenn Hussey2012-03-23 21:00:42 +0000
commitd23f1efe8a606c668ba8979b5894c647cb27d6e3 (patch)
treeb8ae53fef5ba591c78e7d3b9fef3e6e8d6a3841f /plugins/org.eclipse.uml2.uml
parenta888d1254d98d0c73d9eaf79ad4e731952d09586 (diff)
downloadorg.eclipse.uml2.test-d23f1efe8a606c668ba8979b5894c647cb27d6e3.tar.gz
org.eclipse.uml2.test-d23f1efe8a606c668ba8979b5894c647cb27d6e3.tar.xz
org.eclipse.uml2.test-d23f1efe8a606c668ba8979b5894c647cb27d6e3.zip
Initialize constraint enablement from preference store.
Diffstat (limited to 'plugins/org.eclipse.uml2.uml')
-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 751bd5d5..2e56c5ae 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() {

Back to the top