Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-02-18 13:24:23 +0000
committerCamille Letavernier2014-02-18 13:24:23 +0000
commita743e8757565af8f33bd8960c2c693c7c7db9e2a (patch)
tree713dee2bff5559f4fd35ff6e0a1f406d1df4679a
parentc71d6666597273fef04ff595658aa002d80e89d3 (diff)
downloadorg.eclipse.papyrus-a743e8757565af8f33bd8960c2c693c7c7db9e2a.tar.gz
org.eclipse.papyrus-a743e8757565af8f33bd8960c2c693c7c7db9e2a.tar.xz
org.eclipse.papyrus-a743e8757565af8f33bd8960c2c693c7c7db9e2a.zip
Bug 425190 - [CSS] Loss of Notation information when CSS style is
applied on Edges. https://bugs.eclipse.org/bugs/show_bug.cgi?id=425190 - Do not reset styles which are not supported by the CSS Engine (Including the EObjectValueStyle used for SysML association ends)
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java
index 25cec4c4d63..726386e16b2 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java
@@ -102,8 +102,21 @@ public class ResetStyleCommand extends RecordingCommand {
Object styleObject = styleIterator.next();
if(styleObject instanceof NamedStyle) {
NamedStyle customStyle = (NamedStyle)styleObject;
+
if(!CSSStyles.RESERVED_KEYWORDS.contains(customStyle.getName())) {
- styleIterator.remove();
+
+ //Remove only NamedStyle which are supported by the CSS Implementation
+ //See org.eclipse.papyrus.infra.gmfdiag.css.style.impl.CSSViewDelegate.getCSSNamedStyle(EClass, String)
+ //See Bug 425190 - [CSS] Loss of Notation information when CSS style is applied on Edges.
+ switch(customStyle.eClass().getClassifierID()) {
+ case NotationPackage.STRING_VALUE_STYLE:
+ case NotationPackage.BOOLEAN_VALUE_STYLE:
+ case NotationPackage.INT_VALUE_STYLE:
+ case NotationPackage.DOUBLE_VALUE_STYLE:
+ case NotationPackage.STRING_LIST_VALUE_STYLE:
+ styleIterator.remove();
+ }
+
}
} else if(styleObject instanceof Style) {
resetStyle((Style)styleObject);

Back to the top