Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrschnekenbu2014-02-16 21:55:39 +0000
committerrschnekenbu2014-02-16 22:01:07 +0000
commitf1ab824e60ae6f3b1201db9c9ab08db344371d2e (patch)
tree044094febf75481aaa77fbc35fe5f1f8781358a7 /tests
parent5be40091c4ef545220ba241797265ffd9b1cc76e (diff)
parent460dfc77532b3471d72d9a1cd263de8866b9b8e6 (diff)
downloadorg.eclipse.papyrus-f1ab824e60ae6f3b1201db9c9ab08db344371d2e.tar.gz
org.eclipse.papyrus-f1ab824e60ae6f3b1201db9c9ab08db344371d2e.tar.xz
org.eclipse.papyrus-f1ab824e60ae6f3b1201db9c9ab08db344371d2e.zip
Merge branch 'master' into committers/rschnekenbu/master/extendedtypes
Conflicts: plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/META-INF/MANIFEST.MF1
-rw-r--r--tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/src/org/eclipse/papyrus/tests/extra/AllTests.java12
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java7
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project)6
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF)4
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch)3
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.di23
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.notation254
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.uml44
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css39
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/labels.css0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java)4
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java237
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java)0
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java (renamed from tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java)0
30 files changed, 622 insertions, 15 deletions
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/META-INF/MANIFEST.MF b/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/META-INF/MANIFEST.MF
index e7c905da4a8..2844ae19c38 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/META-INF/MANIFEST.MF
+++ b/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/META-INF/MANIFEST.MF
@@ -1,7 +1,6 @@
Manifest-Version: 1.0
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.gmfdiag.css.tests;bundle-version="1.0.0",
org.eclipse.papyrus.bundles.tests;bundle-version="1.0.0",
org.junit;bundle-version="4.10.0",
org.eclipse.papyrus.cdo.core.tests;bundle-version="1.0.0",
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/src/org/eclipse/papyrus/tests/extra/AllTests.java b/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/src/org/eclipse/papyrus/tests/extra/AllTests.java
index 10d5fbe1813..14f733e1eae 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/src/org/eclipse/papyrus/tests/extra/AllTests.java
+++ b/tests/junit/extraplugins/org.eclipse.papyrus.tests.extra/src/org/eclipse/papyrus/tests/extra/AllTests.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
@@ -38,7 +38,7 @@ public class AllTests {
/* UML Compare tests */
/**
* UML Compare tests have been temporarily disabled. See:
- *
+ *
* 389811: [Papyrus Compare] The Papyrus Compare feature is not compatible with Kepler
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=389811
*/
@@ -47,9 +47,7 @@ public class AllTests {
// suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.compare.diff.tests.AllTests.class));
/* **************** plugins *********************** */
- /* css */
- suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.gmfdiag.css.tests.tests.AllTests.class));
-
+
}
/**
@@ -59,7 +57,7 @@ public class AllTests {
/**
* Constructor.
- *
+ *
* @param clazz
* the suite class AllTests2
* @throws InitializationError
@@ -73,7 +71,7 @@ public class AllTests {
/**
* Returns the list of test classes
- *
+ *
* @return the list of test classes
*/
private static Class<?>[] getSuites() {
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
index f79b02086aa..9906a3b4c21 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
@@ -42,7 +42,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.nattable.model.editor.tests;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.sequence.tests;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.interactionoverview.tests;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.diagram.composite.tests;bundle-version="1.0.0"
+ org.eclipse.papyrus.uml.diagram.composite.tests;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.css.tests;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.0.0.qualifier
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
index baac3e43b0e..f9dc589e01e 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010 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
@@ -61,6 +61,9 @@ public class AllTests {
/* search */
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.search.tests.suites.AllTests.class));
+ /* css */
+ suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.gmfdiag.css.tests.tests.AllTests.class));
+
//
/* sysml moved to a separate launcher */
//
@@ -84,7 +87,7 @@ public class AllTests {
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.composite.test.AllTests.class));
//suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.sequence.tests.AllTests.class)); //Disabled. They currently do not run on Hudson
// suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.interactionoverview.tests.AllTests.class)); //Disabled. They currently do not run on Hudson
- //
+ //
//nattable tests
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.nattable.tests.tests.AllTests.class));
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath
index 2d1a4302f04..2d1a4302f04 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project
index ddbc718c56e..ff2463a3162 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project
@@ -6,6 +6,11 @@
</projects>
<buildSpec>
<buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
@@ -24,5 +29,6 @@
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs
index 44217f8c068..44217f8c068 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF
index eb2be6b5fd3..915af9d0366 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF
@@ -15,7 +15,9 @@ Require-Bundle: org.eclipse.ui,
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.junit;bundle-version="4.10.0"
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
+ org.eclipse.core.databinding;bundle-version="1.4.1"
Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.tests,
org.eclipse.papyrus.infra.gmfdiag.css.tests.tests
Bundle-Vendor: Eclipse Modeling Project
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html
index 82d49bf5f81..82d49bf5f81 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties
index 130df98d220..130df98d220 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch
index 934fbbe559c..7e6458447b4 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch
@@ -23,11 +23,12 @@
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.infra.gmfdiag.css.tests.tests.AllTests"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.infra.gmfdiag.css.tests"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms1024m -Xmx4086m"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms1024m -Xmx4086m -XX:MaxPermSize=512M"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di
index c1e4f445dce..c1e4f445dce 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation
index ad421b8149b..ad421b8149b 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml
index 10f71c39957..10f71c39957 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.di b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.di
new file mode 100644
index 00000000000..b38a75b62ee
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.di
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="model.notation#_4EGG0ImVEeOGN4dVepS-Uw"/>
+ </availablePage>
+ <availablePage>
+ <emfPageIdentifier href="model.notation#_8JDKAImVEeOGN4dVepS-Uw"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="model.notation#_4EGG0ImVEeOGN4dVepS-Uw"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="model.notation#_8JDKAImVEeOGN4dVepS-Uw"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.notation b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.notation
new file mode 100644
index 00000000000..6fa635f903c
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.notation
@@ -0,0 +1,254 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML">
+ <notation:Diagram xmi:id="_4EGG0ImVEeOGN4dVepS-Uw" type="PapyrusUMLClassDiagram" name="compartments" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_Cz4qUImWEeOGN4dVepS-Uw" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Cz4qUomWEeOGN4dVepS-Uw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Cz4qU4mWEeOGN4dVepS-Uw" type="7017">
+ <children xmi:type="notation:Shape" xmi:id="_U81zwYmWEeOGN4dVepS-Uw" type="3012">
+ <element xmi:type="uml:Property" href="model.uml#_U81zwImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_U81zwomWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_VDYgoYmWEeOGN4dVepS-Uw" type="3012">
+ <element xmi:type="uml:Property" href="model.uml#_VDYgoImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_VDYgoomWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_VJCcsYmWEeOGN4dVepS-Uw" type="3012">
+ <element xmi:type="uml:Property" href="model.uml#_VJCcsImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_VJCcsomWEeOGN4dVepS-Uw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Cz4qVImWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Cz4qVYmWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Cz4qVomWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Cz4qV4mWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Cz4qWImWEeOGN4dVepS-Uw" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Cz4qWYmWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Cz4qWomWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Cz4qW4mWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Cz4qXImWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Cz4qXYmWEeOGN4dVepS-Uw" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Cz4qXomWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Cz4qX4mWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Cz4qYImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Cz4qYYmWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_cpYD0ImlEeO69MVKNB7cFw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_cpYD0YmlEeO69MVKNB7cFw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_cpYD0omlEeO69MVKNB7cFw"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_CzvgYImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Cz4qUYmWEeOGN4dVepS-Uw" x="45" y="70" width="169"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_DZrfAYmWEeOGN4dVepS-Uw" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_DZrfA4mWEeOGN4dVepS-Uw" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_DZrfBImWEeOGN4dVepS-Uw" type="7006">
+ <children xmi:type="notation:Shape" xmi:id="_V6u_YYmWEeOGN4dVepS-Uw" type="3006">
+ <element xmi:type="uml:Property" href="model.uml#_V6u_YImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_V6u_YomWEeOGN4dVepS-Uw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_DZrfBYmWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_DZrfBomWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_DZrfB4mWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DZrfCImWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_DZrfCYmWEeOGN4dVepS-Uw" type="7007">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_DZrfComWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_DZrfC4mWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_DZrfDImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DZrfDYmWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_DZrfDomWEeOGN4dVepS-Uw" type="7008">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_DZrfD4mWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_DZrfEImWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_DZrfEYmWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DZrfEomWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_cp95sImlEeO69MVKNB7cFw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_cp95sYmlEeO69MVKNB7cFw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_cp95somlEeO69MVKNB7cFw"/>
+ </children>
+ <element xmi:type="uml:Interface" href="model.uml#_DZrfAImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DZrfAomWEeOGN4dVepS-Uw" x="680" y="67"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Dp5FQImWEeOGN4dVepS-Uw" type="2006">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Dp5FQomWEeOGN4dVepS-Uw" type="5023"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_Dp5FQ4mWEeOGN4dVepS-Uw" type="7015">
+ <children xmi:type="notation:Shape" xmi:id="_EAp_cImWEeOGN4dVepS-Uw" type="3017">
+ <element xmi:type="uml:EnumerationLiteral" href="model.uml#_EAgOcImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_EAp_cYmWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_ENAZYYmWEeOGN4dVepS-Uw" type="3017">
+ <element xmi:type="uml:EnumerationLiteral" href="model.uml#_ENAZYImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ENAZYomWEeOGN4dVepS-Uw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Dp5FRImWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Dp5FRYmWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Dp5FRomWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Dp5FR4mWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_cqHqsImlEeO69MVKNB7cFw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_cqHqsYmlEeO69MVKNB7cFw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_cqHqsomlEeO69MVKNB7cFw"/>
+ </children>
+ <element xmi:type="uml:Enumeration" href="model.uml#_DpvUQImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Dp5FQYmWEeOGN4dVepS-Uw" x="36" y="431"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_az5twYmWEeOGN4dVepS-Uw" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_az5tw4mWEeOGN4dVepS-Uw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_az5txImWEeOGN4dVepS-Uw" type="7017">
+ <children xmi:type="notation:Shape" xmi:id="_cSX24ImWEeOGN4dVepS-Uw" type="3012">
+ <element xmi:type="uml:Property" href="model.uml#_cSOF4ImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_cSX24YmWEeOGN4dVepS-Uw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_az5txYmWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_az5txomWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_az5tx4mWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_az5tyImWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_az5tyYmWEeOGN4dVepS-Uw" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_az5tyomWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_az5ty4mWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_az5tzImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_az5tzYmWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_az5tzomWEeOGN4dVepS-Uw" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_az5tz4mWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_az5t0ImWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_az5t0YmWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_az5t0omWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_cqHqs4mlEeO69MVKNB7cFw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_cqHqtImlEeO69MVKNB7cFw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_cqHqtYmlEeO69MVKNB7cFw"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_az5twImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_az5twomWEeOGN4dVepS-Uw" x="42" y="223" width="177" height="163"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_1epSEYmWEeOGN4dVepS-Uw" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_1epSE4mWEeOGN4dVepS-Uw" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_1epSFImWEeOGN4dVepS-Uw" type="7006">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_1epSFYmWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_1epSFomWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_1epSF4mWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1epSGImWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_1epSGYmWEeOGN4dVepS-Uw" type="7007">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_1epSGomWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_1epSG4mWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_1epSHImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1epSHYmWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_1epSHomWEeOGN4dVepS-Uw" type="7008">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_1epSH4mWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_1epSIImWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_1epSIYmWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1epSIomWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_cqHqtomlEeO69MVKNB7cFw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_cqHqt4mlEeO69MVKNB7cFw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_cqHquImlEeO69MVKNB7cFw"/>
+ </children>
+ <element xmi:type="uml:Interface" href="model.uml#_1epSEImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1epSEomWEeOGN4dVepS-Uw" x="683" y="219"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_61R_kYmWEeOGN4dVepS-Uw" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_61R_k4mWEeOGN4dVepS-Uw" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_61R_lImWEeOGN4dVepS-Uw" visible="false" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_61R_lYmWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_61R_lomWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_61R_l4mWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_61R_mImWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_61R_mYmWEeOGN4dVepS-Uw" visible="false" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_61R_momWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_61R_m4mWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_61R_nImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_61R_nYmWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_61R_nomWEeOGN4dVepS-Uw" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_61R_n4mWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_61R_oImWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_61R_oYmWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_61R_oomWEeOGN4dVepS-Uw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_cqHquYmlEeO69MVKNB7cFw" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_cqHquomlEeO69MVKNB7cFw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_cqHqu4mlEeO69MVKNB7cFw"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_61R_kImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_61R_komWEeOGN4dVepS-Uw" x="42" y="597" height="34"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_9TcEEImWEeOGN4dVepS-Uw" type="2012">
+ <children xmi:type="notation:DecorationNode" xmi:id="_9TcEEomWEeOGN4dVepS-Uw" type="5038"/>
+ <element xmi:type="uml:Comment" href="model.uml#_9S_YIImWEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9TcEEYmWEeOGN4dVepS-Uw" x="309" y="101"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_D1WR4YmXEeOGN4dVepS-Uw" type="2012">
+ <children xmi:type="notation:DecorationNode" xmi:id="_D1WR44mXEeOGN4dVepS-Uw" type="5038"/>
+ <element xmi:type="uml:Comment" href="model.uml#_D1WR4ImXEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_D1WR4omXEeOGN4dVepS-Uw" x="353" y="588"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_TnYnQYmXEeOGN4dVepS-Uw" type="2012">
+ <children xmi:type="notation:DecorationNode" xmi:id="_TnYnQ4mXEeOGN4dVepS-Uw" type="5038"/>
+ <element xmi:type="uml:Comment" href="model.uml#_TnYnQImXEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TnYnQomXEeOGN4dVepS-Uw" x="360" y="457"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_anMSAYmXEeOGN4dVepS-Uw" type="2012">
+ <children xmi:type="notation:DecorationNode" xmi:id="_anMSA4mXEeOGN4dVepS-Uw" type="5038"/>
+ <element xmi:type="uml:Comment" href="model.uml#_anMSAImXEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_anMSAomXEeOGN4dVepS-Uw" x="353" y="273" width="148"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Tfr8cYmaEeOGN4dVepS-Uw" type="2012">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Tfr8c4maEeOGN4dVepS-Uw" type="5038"/>
+ <element xmi:type="uml:Comment" href="model.uml#_Tfr8cImaEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Tfr8comaEeOGN4dVepS-Uw" x="852" y="85" width="167"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_TlMukYmaEeOGN4dVepS-Uw" type="2012">
+ <children xmi:type="notation:DecorationNode" xmi:id="_TlV4gImaEeOGN4dVepS-Uw" type="5038"/>
+ <element xmi:type="uml:Comment" href="model.uml#_TlMukImaEeOGN4dVepS-Uw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TlMukomaEeOGN4dVepS-Uw" x="859" y="248" width="149"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_4EGG0YmVEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:EObjectListValueStyle" xmi:id="_OgIPAImWEeOGN4dVepS-Uw" name="css_stylesheets" eObjectListValue="_OgIPAYmWEeOGN4dVepS-Uw"/>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_PR97oImWEeOGN4dVepS-Uw" name="cssClass"/>
+ <element xmi:type="uml:Model" href="model.uml#_4DWgNImVEeOGN4dVepS-Uw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_BTVBEImXEeOGN4dVepS-Uw" type="4013" source="_9TcEEImWEeOGN4dVepS-Uw" target="_Cz4qUImWEeOGN4dVepS-Uw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_BTVBEYmXEeOGN4dVepS-Uw"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_BTVBEomXEeOGN4dVepS-Uw" points="[-35, 6, 146, -36]$[-97, -8, 84, -50]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_BTeyEImXEeOGN4dVepS-Uw" id="(0.12323943661971831,0.31666666666666665)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_GP624ImXEeOGN4dVepS-Uw" type="4013" source="_D1WR4YmXEeOGN4dVepS-Uw" target="_61R_kYmWEeOGN4dVepS-Uw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_GP624YmXEeOGN4dVepS-Uw"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_GP624omXEeOGN4dVepS-Uw" points="[-88, 4, 270, -13]$[-308, 18, 50, 1]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_UCAtwImXEeOGN4dVepS-Uw" type="4013" source="_TnYnQYmXEeOGN4dVepS-Uw" target="_Dp5FQImWEeOGN4dVepS-Uw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_UCAtwYmXEeOGN4dVepS-Uw"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_UCAtwomXEeOGN4dVepS-Uw" points="[-16, 1, 271, -20]$[-237, 18, 50, -3]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_UCKewImXEeOGN4dVepS-Uw" id="(0.16,0.35)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_bQjYEImXEeOGN4dVepS-Uw" type="4013" source="_anMSAYmXEeOGN4dVepS-Uw" target="_az5twYmWEeOGN4dVepS-Uw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_bQjYEYmXEeOGN4dVepS-Uw"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bQjYEomXEeOGN4dVepS-Uw" points="[-74, -1, 224, -18]$[-386, -47, -88, -64]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_YgJloImaEeOGN4dVepS-Uw" type="4013" source="_TlMukYmaEeOGN4dVepS-Uw" target="_1epSEYmWEeOGN4dVepS-Uw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_YgJloYmaEeOGN4dVepS-Uw"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YgJloomaEeOGN4dVepS-Uw" points="[-74, -6, 126, 1]$[-192, 45, 8, 52]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_Y5mAYImaEeOGN4dVepS-Uw" type="4013" source="_Tfr8cYmaEeOGN4dVepS-Uw" target="_DZrfAYmWEeOGN4dVepS-Uw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_Y5mAYYmaEeOGN4dVepS-Uw"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Y5mAYomaEeOGN4dVepS-Uw" points="[-83, -1, 122, -8]$[-198, -48, 7, -55]"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_8JDKAImVEeOGN4dVepS-Uw" type="PapyrusUMLClassDiagram" name="labels" measurementUnit="Pixel">
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_8JDKAYmVEeOGN4dVepS-Uw"/>
+ <element xmi:type="uml:Model" href="model.uml#_4DWgNImVEeOGN4dVepS-Uw"/>
+ </notation:Diagram>
+ <css:StyleSheetReference xmi:id="_OgIPAYmWEeOGN4dVepS-Uw" path="platform:/plugin/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.uml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.uml
new file mode 100644
index 00000000000..b356eaf5ce0
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/compartmentsTest/model.uml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_4DWgNImVEeOGN4dVepS-Uw" name="CSSTests">
+ <ownedComment xmi:type="uml:Comment" xmi:id="__TiJAImVEeOGN4dVepS-Uw">
+ <body>Test model for CSS in Luna >= M5 (Compartments, Labels)</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_9S_YIImWEeOGN4dVepS-Uw" annotatedElement="_CzvgYImWEeOGN4dVepS-Uw">
+ <body>Expected: Attribute collapsed, Nested classifier hidden</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_D1WR4ImXEeOGN4dVepS-Uw" annotatedElement="_61R_kImWEeOGN4dVepS-Uw">
+ <body>Expected: Compartments hidden</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_TnYnQImXEeOGN4dVepS-Uw" annotatedElement="_DpvUQImWEeOGN4dVepS-Uw">
+ <body>Expected: Collapsed = false</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_anMSAImXEeOGN4dVepS-Uw" annotatedElement="_az5twImWEeOGN4dVepS-Uw">
+ <body>Expected: Attribute and Operation visible</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_Tfr8cImaEeOGN4dVepS-Uw" annotatedElement="_DZrfAImWEeOGN4dVepS-Uw">
+ <body>Expected: Compartment Attribute and Operation visible</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_TlMukImaEeOGN4dVepS-Uw" annotatedElement="_1epSEImWEeOGN4dVepS-Uw">
+ <body>Expected: Only operation compartment is visible</body>
+ </ownedComment>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_4DWgNYmVEeOGN4dVepS-Uw">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_CzvgYImWEeOGN4dVepS-Uw" name="Class1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_U81zwImWEeOGN4dVepS-Uw" name="P1"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_VDYgoImWEeOGN4dVepS-Uw" name="P2"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_VJCcsImWEeOGN4dVepS-Uw" name="P3"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_DZrfAImWEeOGN4dVepS-Uw" name="Interface1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_V6u_YImWEeOGN4dVepS-Uw" name="Attribute1"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_DpvUQImWEeOGN4dVepS-Uw" name="Enumeration1">
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_EAgOcImWEeOGN4dVepS-Uw" name="EnumerationLiteral1"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_ENAZYImWEeOGN4dVepS-Uw" name="EnumerationLiteral2"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_az5twImWEeOGN4dVepS-Uw" name="Class2">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_cSOF4ImWEeOGN4dVepS-Uw" name="P"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_1epSEImWEeOGN4dVepS-Uw" name="Interface2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_61R_kImWEeOGN4dVepS-Uw" name="Class3"/>
+</uml:Model>
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di
index 15fd7df2e2b..15fd7df2e2b 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation
index da68a47987d..da68a47987d 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml
index e063ffd6ed3..e063ffd6ed3 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css
index f45a4299049..f45a4299049 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css
new file mode 100644
index 00000000000..fe0cb1f18a7
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/compartments.css
@@ -0,0 +1,39 @@
+* {
+ showTitle: false;
+}
+
+/* Check showTitle, to avoid priority conflicts with more specific rules */
+.showTitleForAllCompartments Compartment {
+ showTitle: true;
+}
+
+Interface > Compartment[kind=attributes],
+Interface > Compartment[kind=nestedclassifiers] {
+ visible:false;
+}
+
+Interface[ownedAttribute] > Compartment[kind=attributes]{
+ visible:true;
+}
+
+Compartment[kind=nestedclassifiers] {
+ visible: false;
+}
+
+
+/* Collapse the Attribute compartment if the Class contains a P1 attribute (Displayed) */
+Class[ownedAttribute~="P1"] > Compartment[kind=attributes]{
+ collapsed: true;
+}
+
+Enumeration > Compartment {
+ collapsed: true;
+}
+
+Enumeration > Compartment[kind=LiteRalS]{ /* Case insensitive */
+ collapsed: false;
+}
+
+Compartment {
+ showTitle: true;
+}
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/labels.css b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/labels.css
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/labels.css
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css
index 0542d4d041f..0542d4d041f 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java
index 5994b38d491..5994b38d491 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java
index 54ee115ce9a..185aab5136d 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.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
@@ -17,7 +17,7 @@ import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
-@SuiteClasses({ CSSClassProviderTest.class, CSSStylesheetTest.class
+@SuiteClasses({ CSSClassProviderTest.class, CSSStylesheetTest.class, CSSCompartmentsTests.class
})
public class AllTests {
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java
index a6946632989..a6946632989 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java
new file mode 100644
index 00000000000..96f7c5198cb
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSCompartmentsTests.java
@@ -0,0 +1,237 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.tests.tests;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
+import org.eclipse.gmf.runtime.notation.BasicCompartment;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.TitleStyle;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.databinding.custom.CustomStringStyleObservableList;
+import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.helper.ResetStyleHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test case for Compartment-related styles and properties
+ * See resources/model/compartmentsTest/model.di for details
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class CSSCompartmentsTests {
+
+ public static final String CLASS_ATTRIBUTE_COMPARTMENT_TYPE = "7017"; //$NON-NLS-1$
+
+ public static final String CLASS_OPERATION_COMPARTMENT_TYPE = "7018"; //$NON-NLS-1$
+
+ public static final String CLASS_CLASSIFIER_COMPARTMENT_TYPE = "7019"; //$NON-NLS-1$
+
+ public static final String INTERFACE_ATTRIBUTE_COMPARTMENT_TYPE = "7006"; //$NON-NLS-1$
+
+ public static final String INTERFACE_OPERATION_COMPARTMENT_TYPE = "7007"; //$NON-NLS-1$
+
+ public static final String INTERFACE_INTERFACEIFIER_COMPARTMENT_TYPE = "7008"; //$NON-NLS-1$
+
+ public static final String ENUMERATION_LITERAL_COMPARTMENT_TYPE = "7015"; //$NON-NLS-1$
+
+ private CSSDiagram diagram;
+
+ @Before
+ public void init() {
+ ResourceSet resourceSet = new ResourceSetImpl();
+ CSSHelper.installCSSSupport(resourceSet);
+
+ URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/compartmentsTest/model.notation", true); //$NON-NLS-1$
+ try {
+ Diagram diagram = (Diagram)EMFHelper.loadEMFModel(resourceSet, uri);
+ Assert.assertNotNull("Cannot find the model", diagram);
+ Assert.assertTrue("CSS are not activated on this resource", diagram instanceof CSSDiagram);
+ this.diagram = (CSSDiagram)diagram;
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ }
+ }
+
+ /* Test Class1 and Class2 */
+ @Test
+ public void testAttributeCompartment() {
+ Shape class1 = findShape("Class1");
+ Shape class2 = findShape("Class2");
+
+ BasicCompartment attributes1 = findCompartment(class1, CLASS_ATTRIBUTE_COMPARTMENT_TYPE);
+ Assert.assertTrue("Attribute compartment should be collapsed, as it contains a P1 property", attributes1.isCollapsed());
+ Assert.assertTrue("Attribute compartment should be visible", attributes1.isVisible());
+ BasicCompartment operations1 = findCompartment(class1, CLASS_OPERATION_COMPARTMENT_TYPE);
+ Assert.assertTrue("Operation compartment should be visible", operations1.isVisible());
+ BasicCompartment classifiers1 = findCompartment(class1, CLASS_CLASSIFIER_COMPARTMENT_TYPE);
+ Assert.assertFalse("Classifiers compartment should be hidden", classifiers1.isVisible());
+
+ BasicCompartment attributes2 = findCompartment(class2, CLASS_ATTRIBUTE_COMPARTMENT_TYPE);
+ Assert.assertFalse("Attribute compartment should not be collapsed, as it doesn't contain a P1 property", attributes2.isCollapsed());
+ Assert.assertTrue("Attribute compartment should be visible", attributes2.isVisible());
+ BasicCompartment operations2 = findCompartment(class2, CLASS_OPERATION_COMPARTMENT_TYPE);
+ Assert.assertTrue("Operation compartment should be visible", operations2.isVisible());
+ BasicCompartment classifiers2 = findCompartment(class2, CLASS_CLASSIFIER_COMPARTMENT_TYPE);
+ Assert.assertFalse("Classifiers compartment should be hidden", classifiers2.isVisible());
+
+
+ }
+
+ /* Test Enumeration1 */
+ @Test
+ //Currently fails. The EnumerationLiteral compartment is not defined in the NotationTypesMap
+ public void testCaseInsensitiveForEnumeration() {
+ Shape enumeration = findShape("Enumeration1");
+ BasicCompartment compartment = findCompartment(enumeration, ENUMERATION_LITERAL_COMPARTMENT_TYPE);
+
+ Assert.assertFalse("EnumerationLiteral Compartment should not be collapsed", compartment.isCollapsed());
+ }
+
+ /* Test Interface 1 and Interface 2 */
+ //Currently fails. The interface compartments are not defined in the NotationTypesMap
+ @Test
+ public void testAttributeCompartmentForInterface() {
+ Shape interface1 = findShape("Interface1");
+ Shape interface2 = findShape("Interface2");
+
+ BasicCompartment attributes1 = findCompartment(interface1, INTERFACE_ATTRIBUTE_COMPARTMENT_TYPE);
+ Assert.assertTrue("Attribute compartment should be visible, as it contains a Property", attributes1.isVisible());
+ BasicCompartment operations1 = findCompartment(interface1, INTERFACE_OPERATION_COMPARTMENT_TYPE);
+ Assert.assertTrue("Operation compartment should be visible", operations1.isVisible());
+ BasicCompartment classifiers1 = findCompartment(interface1, INTERFACE_INTERFACEIFIER_COMPARTMENT_TYPE);
+ Assert.assertFalse("Classifiers compartment should be hidden", classifiers1.isVisible());
+
+ BasicCompartment attributes2 = findCompartment(interface2, INTERFACE_ATTRIBUTE_COMPARTMENT_TYPE);
+ Assert.assertFalse("Attribute compartment should not be visible, as it doesn't contain any property", attributes2.isVisible());
+ BasicCompartment operations2 = findCompartment(interface2, INTERFACE_OPERATION_COMPARTMENT_TYPE);
+ Assert.assertTrue("Operation compartment should be visible", operations2.isVisible());
+ BasicCompartment classifiers2 = findCompartment(interface2, INTERFACE_INTERFACEIFIER_COMPARTMENT_TYPE);
+ Assert.assertFalse("Classifiers compartment should be hidden", classifiers2.isVisible());
+ }
+
+ /* Test Class 3 */
+ @Test
+ public void testCompartmentForceValue() {
+ //Test initial situation
+ Shape class3 = findShape("Class3");
+
+ //Check all compartments
+ for(View childNode : (List<View>)class3.getChildren()) {
+ if(childNode instanceof BasicCompartment) {
+ Assert.assertFalse("All compartments from Class3 should be hidden. " + childNode.getType() + " is visible", childNode.isVisible());
+ }
+ }
+
+ //We need an editingDomain for the ResetStyle operation
+ TransactionalEditingDomain domain = new TransactionalEditingDomainImpl(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE), diagram.eResource().getResourceSet());
+ diagram.eResource().getResourceSet().eAdapters().add(new AdapterFactoryEditingDomain.EditingDomainProvider(domain));
+
+ //Test resetStyle
+ ResetStyleHelper.resetStyle(Collections.singleton(class3));
+
+ //Check only some specific compartments. Some style rules still hide the nestedClassifier compartment. The visibility of e.g. the ShapeCompartment is undetermined.
+ BasicCompartment attributesCompartment = findCompartment(class3, CLASS_ATTRIBUTE_COMPARTMENT_TYPE);
+ BasicCompartment operationsCompartment = findCompartment(class3, CLASS_OPERATION_COMPARTMENT_TYPE);
+
+ Assert.assertTrue("Attributes compartment should be visible after the reset style", attributesCompartment.isVisible());
+ Assert.assertTrue("Operations compartment should be visible after the reset style", operationsCompartment.isVisible());
+ }
+
+ /* Test apply style */
+ @Test
+ //Currently fails. showTitle is not properly supported for BasicCompartments
+ //Unlike Compartment, BasicCompartment doesn't implement TitleStyle. Instead,
+ //it owns a specific instance of TitleStyle, which is not supported by the CSS Engine (?)
+ public void testShowAllCompartmentsTitles() {
+ //Initial state: title should be hidden
+ for(View childNode : (List<View>)diagram.getChildren()) {
+ for(View compartment : (List<View>)childNode.getChildren()) {
+ if(compartment instanceof BasicCompartment) {
+ TitleStyle titleStyle = (TitleStyle)compartment.getStyle(NotationPackage.eINSTANCE.getTitleStyle());
+ Assert.assertFalse("Title should be hidden", titleStyle.isShowTitle());
+ }
+ }
+ }
+
+ //Apply style
+ CustomStringStyleObservableList stylesList = new CustomStringStyleObservableList(diagram, null, "cssClass");
+ stylesList.add("showTitleForAllCompartments");
+
+ //Check that all titles are visible
+ for(View childNode : (List<View>)diagram.getChildren()) {
+ for(View compartment : (List<View>)childNode.getChildren()) {
+ if(compartment instanceof BasicCompartment) {
+ TitleStyle titleStyle = (TitleStyle)compartment.getStyle(NotationPackage.eINSTANCE.getTitleStyle());
+ Assert.assertTrue("Title should be visible", titleStyle.isShowTitle());
+ }
+ }
+ }
+ }
+
+
+ @After
+ public void dispose() {
+ Iterator<Resource> iterator = diagram.eResource().getResourceSet().getResources().iterator();
+ while(iterator.hasNext()) {
+ iterator.next().unload();
+ iterator.remove();
+ }
+ }
+
+ private BasicCompartment findCompartment(Shape element, String type) {
+ for(View childNode : (List<View>)element.getChildren()) {
+ if(type.equals(childNode.getType())) {
+ return (BasicCompartment)childNode;
+ }
+ }
+
+ return null;
+ }
+
+ private Shape findShape(String elementName) {
+ for(Object viewObject : diagram.getChildren()) {
+ View view = (View)viewObject;
+ if(view instanceof Shape && view.getElement() instanceof NamedElement) {
+ NamedElement element = (NamedElement)view.getElement();
+ if(elementName.equals(element.getName())) {
+ return (Shape)view;
+ }
+ }
+ }
+
+ Assert.fail("Cannot find the view associated to " + elementName);
+ return null;
+ }
+
+}
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java
index 0c1efe15355..0c1efe15355 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java
diff --git a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java
index c0fb3f6647a..c0fb3f6647a 100644
--- a/tests/junit/extraplugins/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java

Back to the top