Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSébastien Gabel2014-03-13 09:27:19 +0000
committerCamille Letavernier2014-03-13 09:56:40 +0000
commit1ee9b184876879a6c8a64034895c59069c29a5d2 (patch)
tree384d0416875ac823a2e4dc1bfe4c7711ce78b328 /plugins
parent341b47692a28fae23d7d524efc374c5408832c7e (diff)
downloadorg.eclipse.papyrus-1ee9b184876879a6c8a64034895c59069c29a5d2.tar.gz
org.eclipse.papyrus-1ee9b184876879a6c8a64034895c59069c29a5d2.tar.xz
org.eclipse.papyrus-1ee9b184876879a6c8a64034895c59069c29a5d2.zip
430213: [CSS] Patch fixing a comparison problem leading to useless CSS
serialization https://bugs.eclipse.org/bugs/show_bug.cgi?id=430213
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java
index 14d89f7bc71..df0e7877f44 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2012 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -267,7 +267,9 @@ public abstract class AbstractStyleHandler extends AbstractHandler {
for(EStructuralFeature feature : style.eClass().getEAllStructuralFeatures()) {
if(NotationPackage.eINSTANCE.getStyle().isSuperTypeOf(feature.getEContainingClass())) {
- boolean check = style.eGet(feature) != feature.getDefaultValue();
+ Object currentValue = style.eGet(feature);
+ Object defaultValue = feature.getDefaultValue();
+ boolean check = currentValue == null ? currentValue != defaultValue : !currentValue.equals(defaultValue);
declarations.put(handleStyleFeature(style, feature), check);
}
}

Back to the top