Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-02-11 07:30:12 -0500
committerCamille Letavernier2014-02-11 07:30:12 -0500
commit533bc1a38c1403e05ec61b7c736a0029d6cbe3f3 (patch)
treeec6c9a05e3f88fa1749c26e06d089257519e29a2
parentcba712f64cb5837fa4f31cccbbd8cd2c6edf0b6b (diff)
downloadorg.eclipse.papyrus-533bc1a38c1403e05ec61b7c736a0029d6cbe3f3.tar.gz
org.eclipse.papyrus-533bc1a38c1403e05ec61b7c736a0029d6cbe3f3.tar.xz
org.eclipse.papyrus-533bc1a38c1403e05ec61b7c736a0029d6cbe3f3.zip
417180: [CSS] The CSS Engine shall support element visibility
https://bugs.eclipse.org/bugs/show_bug.cgi?id=417180
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSBasicCompartmentImpl.java20
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/AbstractCustomStyleListValueCommand.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/src/org/eclipse/papyrus/uml/diagram/css/dom/GMFUMLElementProvider.java8
-rw-r--r--tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF26
-rw-r--r--tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java4
5 files changed, 39 insertions, 21 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSBasicCompartmentImpl.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSBasicCompartmentImpl.java
index 06c9ca62904..6e7618a238a 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSBasicCompartmentImpl.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/CSSBasicCompartmentImpl.java
@@ -11,7 +11,9 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.css;
+import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.notation.NamedStyle;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.impl.BasicCompartmentImpl;
import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
@@ -139,5 +141,23 @@ public class CSSBasicCompartmentImpl extends BasicCompartmentImpl implements CSS
ForceValueHelper.unsetValue(this, feature);
}
+ //////////////////////////////////
+ // Implements the getNamedStyle //
+ //////////////////////////////////
+
+ @Override
+ public NamedStyle getNamedStyle(EClass eClass, String name) {
+ return getCSSNamedStyle(eClass, name);
+ }
+
+ public NamedStyle getCSSNamedStyle(EClass eClass, String name) {
+ NamedStyle userStyle = super.getNamedStyle(eClass, name);
+ if(userStyle != null) {
+ return userStyle;
+ }
+
+ return getCSSView().getCSSNamedStyle(eClass, name);
+ }
+
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/AbstractCustomStyleListValueCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/AbstractCustomStyleListValueCommand.java
index afc063b18a9..3761d7679ad 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/AbstractCustomStyleListValueCommand.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/AbstractCustomStyleListValueCommand.java
@@ -48,7 +48,6 @@ public abstract class AbstractCustomStyleListValueCommand extends AbstractComman
this.domain = domain;
}
- @Override
public void execute() {
//FIXME: Related to CompoundCommand vs StrictCompoundCommand.
//Sometimes, canExecute() is not called, and the command is not prepared
@@ -63,7 +62,6 @@ public abstract class AbstractCustomStyleListValueCommand extends AbstractComman
command.execute();
}
- @Override
public void redo() {
execute();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/src/org/eclipse/papyrus/uml/diagram/css/dom/GMFUMLElementProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/src/org/eclipse/papyrus/uml/diagram/css/dom/GMFUMLElementProvider.java
index ea985c2e843..10e15f0a501 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/src/org/eclipse/papyrus/uml/diagram/css/dom/GMFUMLElementProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css/src/org/eclipse/papyrus/uml/diagram/css/dom/GMFUMLElementProvider.java
@@ -19,15 +19,15 @@ import org.w3c.dom.Element;
/**
* An IElementProvider for UML-specific CSS concepts
- *
+ *
* Provides a specialization of GMFElementAdapter for UML Elements
- *
+ *
* @author Camille Letavernier
*/
-@SuppressWarnings("restriction") //e4 CSS
+@SuppressWarnings("restriction")
+//e4 CSS
public class GMFUMLElementProvider implements IElementProvider {
- @Override
public Element getElement(Object element, CSSEngine engine) {
if(!(element instanceof View)) {
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF
index 481cbb8fc50..f5e2ee147d5 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF
@@ -1,27 +1,27 @@
Manifest-Version: 1.0
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.css.configuration;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.css.properties;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.css.xtext;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.gmfdiag.css.configuration;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.gmfdiag.css.properties;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.gmfdiag.css.xtext;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.2",
org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.core;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.widgets;bundle-version="0.10.2",
org.eclipse.core.resources;bundle-version="3.8.0",
org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.emf.appearance;bundle-version="0.10.2",
org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0"
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="0.10.2"
Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.tests,
org.eclipse.papyrus.infra.gmfdiag.css.tests.tests
Bundle-Vendor: Eclipse Modeling Project
Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 0.10.2.qualifier
Bundle-Name: CSS Tests (Incubation)
Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.tests.Activato
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java
index 96f7c5198cb..a54c50709f7 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java
+++ b/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java
@@ -45,7 +45,7 @@ import org.junit.Test;
/**
* Test case for Compartment-related styles and properties
* See resources/model/compartmentsTest/model.di for details
- *
+ *
* @author Camille Letavernier
*
*/
@@ -110,7 +110,7 @@ public class CSSCompartmentsTests {
/* Test Enumeration1 */
@Test
- //Currently fails. The EnumerationLiteral compartment is not defined in the NotationTypesMap
+ //Currently fails. The CSS Attributes are still case-sensitive
public void testCaseInsensitiveForEnumeration() {
Shape enumeration = findShape("Enumeration1");
BasicCompartment compartment = findCompartment(enumeration, ENUMERATION_LITERAL_COMPARTMENT_TYPE);

Back to the top