Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-02-17 05:14:50 -0500
committerCamille Letavernier2014-02-17 05:14:50 -0500
commite9e268f54d267c66e16393415d5a11c22391af5d (patch)
tree3750dee65494de20b51810f499441ec4dcd162e6
parentb579b4858c8aa755276f8308f461a488f5f583df (diff)
downloadorg.eclipse.papyrus-e9e268f54d267c66e16393415d5a11c22391af5d.tar.gz
org.eclipse.papyrus-e9e268f54d267c66e16393415d5a11c22391af5d.tar.xz
org.eclipse.papyrus-e9e268f54d267c66e16393415d5a11c22391af5d.zip
417396: [CSS] The CSS Engine shall support label visibility & mask
https://bugs.eclipse.org/bugs/show_bug.cgi?id=417396 - Do not reset style for transient compartments (e.g. Stereotype compartments)
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java10
1 files changed, 6 insertions, 4 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 87dd09bf64e..25cec4c4d63 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
@@ -92,6 +92,10 @@ public class ResetStyleCommand extends RecordingCommand {
}
private void resetStyle(View view) {
+ //Reset the view (Except for volatile/transient elements which are already derived, e.g. Stereotype compartments)
+ if(view.eContainingFeature().isTransient()) {
+ return;
+ }
Iterator<?> styleIterator = view.getStyles().iterator();
while(styleIterator.hasNext()) {
@@ -115,10 +119,8 @@ public class ResetStyleCommand extends RecordingCommand {
//Remove the Papyrus Style EAnnotations
resetStyleAnnotations(view);
- if(view.eClass() != NotationPackage.eINSTANCE.getDecorationNode()) {
- //Reset the visibility (Except for labels which are not yet supported)
- view.eUnset(NotationPackage.eINSTANCE.getView_Visible());
- }
+ //Reset the visibility
+ view.eUnset(NotationPackage.eINSTANCE.getView_Visible());
}
private void resetStyle(Style style) {

Back to the top