Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'incoming/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/ForceValueHelper.java')
-rw-r--r--incoming/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/ForceValueHelper.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/incoming/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/ForceValueHelper.java b/incoming/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/ForceValueHelper.java
index 5366062ac87..588602a1498 100644
--- a/incoming/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/ForceValueHelper.java
+++ b/incoming/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/ForceValueHelper.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.css.resource.CSSNotationResource;
/**
* This helper handles the EAnnotation used to distinguish between an EMF
@@ -69,8 +70,8 @@ public class ForceValueHelper {
}
private static boolean isCSSView(View view) {
- return false;
- // return view != null && view.eResource() instanceof CSSNotationResource;
+ // return false;
+ return view != null && view.eResource() instanceof CSSNotationResource;
}
private static boolean equals(Object value1, Object value2) {
@@ -86,6 +87,10 @@ public class ForceValueHelper {
return;
}
+ if(feature == null) {
+ return;
+ }
+
//Remove the annotation which forces the value, if needed
String annotationKey = feature.getName();
@@ -104,13 +109,12 @@ public class ForceValueHelper {
}
public static boolean isSet(View annotationContext, EObject style, EStructuralFeature feature, Object value) {
- boolean defaultIsSet = style.eIsSet(feature);
if(!isCSSView(annotationContext)) {
//Do not contaminate non-Papyrus models
return true;
}
- if(!defaultIsSet) {
+ if(!style.eIsSet(feature)) {
return false;
}

Back to the top