summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorS├ębastien Gabel2014-03-13 05:27:19 (EDT)
committerCamille Letavernier2014-03-13 05:56:40 (EDT)
commit1ee9b184876879a6c8a64034895c59069c29a5d2 (patch)
tree384d0416875ac823a2e4dc1bfe4c7711ce78b328
parent341b47692a28fae23d7d524efc374c5408832c7e (diff)
downloadorg.eclipse.papyrus-1ee9b184876879a6c8a64034895c59069c29a5d2.zip
org.eclipse.papyrus-1ee9b184876879a6c8a64034895c59069c29a5d2.tar.gz
org.eclipse.papyrus-1ee9b184876879a6c8a64034895c59069c29a5d2.tar.bz2
430213: [CSS] Patch fixing a comparison problem leading to useless CSS
serialization https://bugs.eclipse.org/bugs/show_bug.cgi?id=430213
-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 14d89f7..df0e787 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);
}
}