Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/junit/plugins/infra/gmfdiag')
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath7
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project34
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF32
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html28
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties7
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch41
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di17
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation57
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml4
-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.di17
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation261
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml17
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css98
-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.css55
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java69
-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.java25
-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.java98
-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.java177
-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.java77
26 files changed, 1725 insertions, 0 deletions
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project
new file mode 100644
index 00000000000..ff2463a3162
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.gmfdiag.css.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <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/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tests/junit/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..915af9d0366
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,32 @@
+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.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.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.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
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: CSS Tests (Incubation)
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.tests.Activato
+ r
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.tests
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties
new file mode 100644
index 00000000000..130df98d220
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ resources/,\
+ about.html
+src.includes = about.html
diff --git a/tests/junit/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..7e6458447b4
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/org.eclipse.papyrus.infra.gmfdiag.css.tests.launch
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<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 -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"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/tests/junit/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..c1e4f445dce
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ASCII"?>
+<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#_MDVbsHTIEeG92qGoaUUGLQ"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="model.notation#_MDVbsHTIEeG92qGoaUUGLQ"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..ad421b8149b
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.notation
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" 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="_MDVbsHTIEeG92qGoaUUGLQ" type="PapyrusUMLClassDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_PHIj4HTIEeG92qGoaUUGLQ" type="2004" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PHIj4nTIEeG92qGoaUUGLQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PHIj43TIEeG92qGoaUUGLQ" key="fontHeight" value="true"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PHIj5HTIEeG92qGoaUUGLQ" key="bold" value="true"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PHIj5XTIEeG92qGoaUUGLQ" key="italic" value="true"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PHIj5nTIEeG92qGoaUUGLQ" key="fontColor" value="true"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PHIj53TIEeG92qGoaUUGLQ" key="fillColor" value="true"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PHSU4HTIEeG92qGoaUUGLQ" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PHSU4XTIEeG92qGoaUUGLQ" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PHSU4nTIEeG92qGoaUUGLQ" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PHSU43TIEeG92qGoaUUGLQ" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PHSU5HTIEeG92qGoaUUGLQ" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PHSU5XTIEeG92qGoaUUGLQ" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_PHSU5nTIEeG92qGoaUUGLQ" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_PHSU53TIEeG92qGoaUUGLQ" type="7006">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PHlP0HTIEeG92qGoaUUGLQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PHlP0XTIEeG92qGoaUUGLQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_PHSU6HTIEeG92qGoaUUGLQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PHSU6XTIEeG92qGoaUUGLQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PHSU6nTIEeG92qGoaUUGLQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PHSU63TIEeG92qGoaUUGLQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_PHSU7HTIEeG92qGoaUUGLQ" type="7007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PHlP0nTIEeG92qGoaUUGLQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PHlP03TIEeG92qGoaUUGLQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_PHSU7XTIEeG92qGoaUUGLQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PHSU7nTIEeG92qGoaUUGLQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PHSU73TIEeG92qGoaUUGLQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PHSU8HTIEeG92qGoaUUGLQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_PHSU8XTIEeG92qGoaUUGLQ" type="7008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_PHlP1HTIEeG92qGoaUUGLQ" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_PHlP1XTIEeG92qGoaUUGLQ" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_PHSU8nTIEeG92qGoaUUGLQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_PHSU83TIEeG92qGoaUUGLQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_PHSU9HTIEeG92qGoaUUGLQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PHSU9XTIEeG92qGoaUUGLQ"/>
+ </children>
+ <element xmi:type="uml:Interface" href="model.uml#_PGr38HTIEeG92qGoaUUGLQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_PHIj4XTIEeG92qGoaUUGLQ" x="271" y="159"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_MDVbsXTIEeG92qGoaUUGLQ"/>
+ <styles xmi:type="notation:EObjectListValueStyle" xmi:id="_ifHmEHTlEeGmJ4iNo0Pbxg" name="css_stylesheets" eObjectListValue="_ifHmEXTlEeGmJ4iNo0Pbxg"/>
+ <element xmi:type="uml:Model" href="model.uml#_MBtEAHTIEeG92qGoaUUGLQ"/>
+ </notation:Diagram>
+ <css:StyleSheetReference xmi:id="_ifHmEXTlEeGmJ4iNo0Pbxg" path="/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..10f71c39957
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/classProviderTest/model.uml
@@ -0,0 +1,4 @@
+<?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="_MBtEAHTIEeG92qGoaUUGLQ" name="model">
+ <packagedElement xmi:type="uml:Interface" xmi:id="_PGr38HTIEeG92qGoaUUGLQ" name="Interface1"/>
+</uml:Model>
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/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..15fd7df2e2b
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ASCII"?>
+<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#_o6cwoH_vEeGjwt6V_QPj1Q"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="model.notation#_o6cwoH_vEeGjwt6V_QPj1Q"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..da68a47987d
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.notation
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" 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="_o6cwoH_vEeGjwt6V_QPj1Q" type="PapyrusUMLClassDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_prvDoH_vEeGjwt6V_QPj1Q" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_prwRxH_vEeGjwt6V_QPj1Q" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_prwRxX_vEeGjwt6V_QPj1Q" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_prwRxn_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_prwRx3_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_prwRyH_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_prwRyX_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_prwRyn_vEeGjwt6V_QPj1Q" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_prwRy3_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_prwRzH_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_prwRzX_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_prwRzn_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_prw40H_vEeGjwt6V_QPj1Q" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_prw40X_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_prw40n_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_prw403_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_prw41H_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_pqo3cH_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_prvDoX_vEeGjwt6V_QPj1Q" x="235" y="170"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_pwH0YH_vEeGjwt6V_QPj1Q" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_pwIbdn_vEeGjwt6V_QPj1Q" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_pwIbd3_vEeGjwt6V_QPj1Q" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_pwIbeH_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_pwIbeX_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_pwIben_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pwIbe3_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_pwIbfH_vEeGjwt6V_QPj1Q" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_pwIbfX_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_pwIbfn_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_pwIbf3_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pwIbgH_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_pwIbgX_vEeGjwt6V_QPj1Q" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_pwIbgn_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_pwIbg3_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_pwIbhH_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pwIbhX_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_pwFYIH_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pwH0YX_vEeGjwt6V_QPj1Q" x="540" y="165"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_qRBiAH_vEeGjwt6V_QPj1Q" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_qRCwJn_vEeGjwt6V_QPj1Q" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_qRCwJ3_vEeGjwt6V_QPj1Q" type="7006">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_qRCwKH_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_qRCwKX_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_qRDXMH_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qRDXMX_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_qRDXMn_vEeGjwt6V_QPj1Q" type="7007">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_qRDXM3_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_qRDXNH_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_qRDXNX_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qRDXNn_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_qRDXN3_vEeGjwt6V_QPj1Q" type="7008">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_qRDXOH_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_qRDXOX_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_qRDXOn_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qRDXO3_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <element xmi:type="uml:Interface" href="model.uml#_qQ-esH_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qRBiAX_vEeGjwt6V_QPj1Q" x="134" y="378"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_qWScgH_vEeGjwt6V_QPj1Q" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_qWTqon_vEeGjwt6V_QPj1Q" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_qWTqo3_vEeGjwt6V_QPj1Q" type="7006">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_qWTqpH_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_qWTqpX_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_qWTqpn_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qWTqp3_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_qWTqqH_vEeGjwt6V_QPj1Q" type="7007">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_qWTqqX_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_qWTqqn_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_qWTqq3_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qWTqrH_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_qWTqrX_vEeGjwt6V_QPj1Q" type="7008">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_qWTqrn_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_qWTqr3_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_qWTqsH_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qWTqsX_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_yGpacH_vEeGjwt6V_QPj1Q" name="cssClass">
+ <stringListValue>myInterface</stringListValue>
+ </styles>
+ <element xmi:type="uml:Interface" href="model.uml#_qWPZMH_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qWScgX_vEeGjwt6V_QPj1Q" x="450" y="375"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_qcFigH_vEeGjwt6V_QPj1Q" type="2004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_qcGwoX_vEeGjwt6V_QPj1Q" type="5011"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_qcGwon_vEeGjwt6V_QPj1Q" type="7006">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_qcGwo3_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_qcGwpH_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_qcGwpX_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qcGwpn_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_qcGwp3_vEeGjwt6V_QPj1Q" type="7007">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_qcGwqH_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_qcGwqX_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_qcGwqn_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qcGwq3_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_qcGwrH_vEeGjwt6V_QPj1Q" type="7008">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_qcGwrX_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_qcGwrn_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_qcGwr3_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qcGwsH_vEeGjwt6V_QPj1Q"/>
+ </children>
+ <element xmi:type="uml:Interface" href="model.uml#_qcCfMH_vEeGjwt6V_QPj1Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qcFigX_vEeGjwt6V_QPj1Q" x="720" y="370"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_j7FOcIABEeGwNeJPoDbgzg" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_j7HqsoABEeGwNeJPoDbgzg" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_j7Hqs4ABEeGwNeJPoDbgzg" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_j7HqtIABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_j7HqtYABEeGwNeJPoDbgzg"/>
+ </children>
+ <element xmi:type="uml:Package" href="model.uml#_j6agEIABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_j7FOcYABEeGwNeJPoDbgzg" x="715" y="95" width="186" height="131"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="__AfVgIABEeGwNeJPoDbgzg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="__AgjpoABEeGwNeJPoDbgzg" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="__Agjp4ABEeGwNeJPoDbgzg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="__AhKsIABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="__AhKsYABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="__AhKsoABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__AhKs4ABEeGwNeJPoDbgzg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="__AhKtIABEeGwNeJPoDbgzg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="__AhKtYABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="__AhKtoABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="__AhKt4ABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__AhKuIABEeGwNeJPoDbgzg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="__AhKuYABEeGwNeJPoDbgzg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="__AhKuoABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="__AhKu4ABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="__AhKvIABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__AhKvYABEeGwNeJPoDbgzg"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#__AZ18IABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__AfVgYABEeGwNeJPoDbgzg" x="105" y="525"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="__TuakIABEeGwNeJPoDbgzg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="__TvotIABEeGwNeJPoDbgzg" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="__TvotYABEeGwNeJPoDbgzg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="__TvotoABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="__Tvot4ABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="__TvouIABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__TvouYABEeGwNeJPoDbgzg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="__TvouoABEeGwNeJPoDbgzg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="__Tvou4ABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="__TvovIABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="__TvovYABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__TwPwIABEeGwNeJPoDbgzg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="__TwPwYABEeGwNeJPoDbgzg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="__TwPwoABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="__TwPw4ABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="__TwPxIABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__TwPxYABEeGwNeJPoDbgzg"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_R7m7sIACEeGwNeJPoDbgzg" name="cssClass">
+ <stringListValue>myClass</stringListValue>
+ <stringListValue>myOtherClass</stringListValue>
+ </styles>
+ <element xmi:type="uml:Class" href="model.uml#__TtMcIABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__TuakYABEeGwNeJPoDbgzg" x="363" y="528"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="__jbqgIABEeGwNeJPoDbgzg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="__jcRl4ABEeGwNeJPoDbgzg" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="__jcRmIABEeGwNeJPoDbgzg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="__jcRmYABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="__jcRmoABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="__jcRm4ABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__jcRnIABEeGwNeJPoDbgzg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="__jc4oIABEeGwNeJPoDbgzg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="__jc4oYABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="__jc4ooABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="__jc4o4ABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__jc4pIABEeGwNeJPoDbgzg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="__jc4pYABEeGwNeJPoDbgzg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="__jc4poABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="__jc4p4ABEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="__jc4qIABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__jc4qYABEeGwNeJPoDbgzg"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#__jacYIABEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__jbqgYABEeGwNeJPoDbgzg" x="647" y="541"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_aQdt0IACEeGwNeJPoDbgzg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_aQe79IACEeGwNeJPoDbgzg" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_aQe79YACEeGwNeJPoDbgzg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_aQe79oACEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_aQe794ACEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_aQe7-IACEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aQe7-YACEeGwNeJPoDbgzg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_aQe7-oACEeGwNeJPoDbgzg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_aQe7-4ACEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_aQe7_IACEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_aQe7_YACEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aQe7_oACEeGwNeJPoDbgzg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_aQfjAIACEeGwNeJPoDbgzg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_aQfjAYACEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_aQfjAoACEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_aQfjA4ACEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aQfjBIACEeGwNeJPoDbgzg"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_bTq3QIACEeGwNeJPoDbgzg" name="cssClass">
+ <stringListValue>myClass</stringListValue>
+ </styles>
+ <element xmi:type="uml:Class" href="model.uml#_aQb4oIACEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aQdt0YACEeGwNeJPoDbgzg" x="859" y="555"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_b0maEIACEeGwNeJPoDbgzg" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_b0oPQIACEeGwNeJPoDbgzg" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_b0oPQYACEeGwNeJPoDbgzg" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_b0oPQoACEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_b0oPQ4ACEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_b0oPRIACEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_b0oPRYACEeGwNeJPoDbgzg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_b0oPRoACEeGwNeJPoDbgzg" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_b0oPR4ACEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_b0oPSIACEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_b0oPSYACEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_b0oPSoACEeGwNeJPoDbgzg"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_b0oPS4ACEeGwNeJPoDbgzg" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_b0oPTIACEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_b0oPTYACEeGwNeJPoDbgzg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_b0oPToACEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_b0oPT4ACEeGwNeJPoDbgzg"/>
+ </children>
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_dz2VAIACEeGwNeJPoDbgzg" name="cssClass">
+ <stringListValue>myClass</stringListValue>
+ </styles>
+ <element xmi:type="uml:Class" href="model.uml#_b0lL8IACEeGwNeJPoDbgzg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_b0maEYACEeGwNeJPoDbgzg" x="490" y="610"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_o6cwoX_vEeGjwt6V_QPj1Q"/>
+ <styles xmi:type="notation:EObjectListValueStyle" xmi:id="_wKMU0H_vEeGjwt6V_QPj1Q" name="css_stylesheets" eObjectListValue="_wKMU0X_vEeGjwt6V_QPj1Q"/>
+ <element xmi:type="uml:Model" href="model.uml#_o6SYkH_vEeGjwt6V_QPj1Q"/>
+ </notation:Diagram>
+ <css:StyleSheetReference xmi:id="_wKMU0X_vEeGjwt6V_QPj1Q" path="../../stylesheets/stylesheetTest.css"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..e063ffd6ed3
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/model/stylesheetTest/model.uml
@@ -0,0 +1,17 @@
+<?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="_o6SYkH_vEeGjwt6V_QPj1Q" name="Model">
+ <packageImport xmi:id="_o6SYkX_vEeGjwt6V_QPj1Q">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_pqo3cH_vEeGjwt6V_QPj1Q" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_pwFYIH_vEeGjwt6V_QPj1Q" name="Class2"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_qQ-esH_vEeGjwt6V_QPj1Q" name="Interface1"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_qWPZMH_vEeGjwt6V_QPj1Q" name="Interface2"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_qcCfMH_vEeGjwt6V_QPj1Q" name="Interface3"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_j6agEIABEeGwNeJPoDbgzg" name="Package1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="__AZ18IABEeGwNeJPoDbgzg" name="Class3" isAbstract="true"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="__TtMcIABEeGwNeJPoDbgzg" name="Class4" isAbstract="true"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="__jacYIABEeGwNeJPoDbgzg" name="Class5" isAbstract="true"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_aQb4oIACEeGwNeJPoDbgzg" name="Class6"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_b0lL8IACEeGwNeJPoDbgzg" name="Class7" isAbstract="true"/>
+</uml:Model>
diff --git a/tests/junit/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..f45a4299049
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/classProviderTest.css
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr
+ *****************************************************************************/
+
+/**
+* Papyrus 0.9 CSS
+* Test stylesheet for #getAvailableClasses()
+*/
+
+/********************************************************
+ * All cX should be matched for Interfaces (c01 ~ c17)
+ * xX should not be matched for Interfaces
+ *******************************************************/
+
+
+/**************** Ignored Selector *********************/
+
+.anyClass {
+
+}
+
+/**************** Simple selectors *********************/
+
+
+*.c01{
+
+}
+
+Interface.c02{
+
+}
+
+.c03 {
+
+}
+
+.c04, .c05, .c06 {
+
+}
+
+Class.x01{
+
+}
+
+#x05 {
+
+}
+
+/************ Combinator selectors **************/
+
+.c07 .c08 {
+
+}
+.c09 Class.x02{
+
+}
+
+.c10 > Class.x03{
+
+}
+
+Interface.c11 + Class.x04 {
+
+}
+
+*.c12 + Interface.c13 {
+
+}
+
+/************* Combinator Conditions ****************/
+
+#x06:x07 {
+
+}
+
+.c14#x8:x09{
+
+}
+
+Interface.c15#x10{
+
+}
+
+#x11.c16 {
+
+}
+
+#x12.c17:x13 {
+
+}
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/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..0542d4d041f
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/resources/stylesheets/stylesheetTest.css
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr
+ *****************************************************************************/
+
+/**
+* Papyrus 0.9 CSS
+* Main test stylesheet
+*/
+
+* {
+ gradient:red vertical;
+}
+
+Class {
+ gradient:none;
+ fillColor:red;
+}
+
+Interface {
+ fillColor:yellow;
+}
+
+Interface.myInterface {
+ fontName:KaiTi; /* TODO: The font name should be case insensitive */
+ fillColor:lightgreen;
+ gradient:dEEpSKyBluE lightgreen horizontal;
+ elementIcon:false;
+}
+
+Package {
+ fillColor:white;
+}
+
+/* White elements */
+Class.myClass.myOtherClass, Class.myClass {
+ fillColor:white;
+ gradient:none;
+ bold:false;
+ fontName: Tunga;
+}
+
+/* Blue + Gradient + Bold */
+Class[isAbstract=true] {
+ bold:true;
+ fillColor: rgb(195, 205, 255);
+ gradient: white vertical;
+}
diff --git a/tests/junit/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..5994b38d491
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * 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
+ * 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;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.gmfdiag.css.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/tests/junit/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..185aab5136d
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/AllTests.java
@@ -0,0 +1,25 @@
+/*****************************************************************************
+ * 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
+ * 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 org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(Suite.class)
+@SuiteClasses({ CSSClassProviderTest.class, CSSStylesheetTest.class, CSSCompartmentsTests.class
+
+})
+public class AllTests {
+
+}
diff --git a/tests/junit/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..a6946632989
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSClassProviderTest.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * 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
+ * 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.Arrays;
+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.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
+import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.provider.CSSClassContentProvider;
+import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+
+public class CSSClassProviderTest {
+
+ private CSSDiagram diagram;
+
+ private static int expectedNumberOfClasses = 17;
+
+ @Before
+ public void init() {
+ ResourceSet resourceSet = new ResourceSetImpl();
+ CSSHelper.installCSSSupport(resourceSet);
+
+ URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/classProviderTest/model.notation", true);
+ 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
+ public void testCSSClassContentProvider() {
+ ExtendedCSSEngine engine = diagram.getEngine();
+ IStaticContentProvider provider = new CSSClassContentProvider("Interface", engine);
+ Object[] result = provider.getElements();
+ List<Object> resultList = Arrays.asList(result);
+
+ //Result is expected to contain c01 to c17
+ //Result should not contain x01 to x13
+ //Result may contain anything else (Depending on the current Workspace Theme).
+
+ //Check that all expected classes are returned
+ for(int i = 1; i <= expectedNumberOfClasses; i++) {
+ String expectedClassName = "c";
+ if(i < 10) {
+ expectedClassName += "0";
+ }
+ expectedClassName += i;
+ Assert.assertTrue("An expected CSS Class has not been found: " + expectedClassName, resultList.contains(expectedClassName));
+ }
+
+ //Check that no invalid class is returned
+ for(Object object : resultList) {
+ Assert.assertTrue("The CSSClassContentProvider must return Strings", object instanceof String);
+ String cssClass = (String)object;
+
+ Assert.assertFalse("Invalid CSS Class has been returned: " + cssClass, cssClass.matches("x[0-9]+"));
+ }
+ }
+
+ @After
+ public void dispose() {
+ Iterator<Resource> iterator = diagram.eResource().getResourceSet().getResources().iterator();
+ while(iterator.hasNext()) {
+ iterator.next().unload();
+ iterator.remove();
+ }
+ }
+}
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/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..0c1efe15355
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSStylesheetTest.java
@@ -0,0 +1,177 @@
+/*****************************************************************************
+ * 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
+ * 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.Iterator;
+
+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.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.GradientStyle;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper;
+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;
+
+
+public class CSSStylesheetTest {
+
+ private CSSDiagram diagram;
+
+ @Before
+ public void init() {
+ ResourceSet resourceSet = new ResourceSetImpl();
+ CSSHelper.installCSSSupport(resourceSet);
+
+ URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/stylesheetTest/model.notation", true);
+ 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
+ public void testClassStyle() {
+ Shape classView = findShape("Class1");
+ if(classView == null) {
+ return;
+ }
+
+ Assert.assertEquals("Invalid color", rgb(255, 0, 0), classView.getFillColor()); //Red = #FF0000
+ Assert.assertNull("Invalid gradient", classView.getGradient());
+ Assert.assertTrue(AppearanceHelper.showElementIcon(classView));
+ }
+
+ @Test
+ public void testInterfaceStyle() {
+ Shape interfaceView = findShape("Interface1");
+
+ Assert.assertNotNull(interfaceView.getGradient());
+ Assert.assertEquals(rgb(255, 255, 0), interfaceView.getFillColor()); //Yellow = #FFFF00
+ Assert.assertEquals(rgb(255, 0, 0), interfaceView.getGradient().getGradientColor1()); //Red = #FF0000
+ Assert.assertEquals(GradientStyle.VERTICAL, interfaceView.getGradient().getGradientStyle());
+ Assert.assertTrue(AppearanceHelper.showElementIcon(interfaceView));
+ }
+
+ @Test
+ public void testCSSClassStyle() {
+ Shape interfaceView = findShape("Interface2");
+ Assert.assertNotNull(interfaceView.getGradient());
+ Assert.assertEquals(rgb(144, 238, 144), interfaceView.getFillColor()); //Lightgreen = #90EE90
+
+ //Case insensitive color name
+ Assert.assertEquals(rgb(0, 191, 255), interfaceView.getGradient().getGradientColor1()); //DeepSkyBlue = #00BFFF
+
+ Assert.assertEquals(GradientStyle.HORIZONTAL, interfaceView.getGradient().getGradientStyle());
+ Assert.assertFalse(AppearanceHelper.showElementIcon(interfaceView));
+
+ //TODO: Font names should be case-insensitive
+ Assert.assertEquals("KaiTi", interfaceView.getFontName());
+ }
+
+ @Test
+ public void testPackage() {
+ Shape packageView = findShape("Package1");
+ Assert.assertNotNull(packageView.getGradient());
+
+ //Inherited style (From *)
+ Assert.assertEquals(rgb(255, 0, 0), packageView.getGradient().getGradientColor1()); //Red = #FF0000
+ }
+
+ @Test
+ public void testPriorities() {
+ //Tests the priorities between styles:
+ //.myClass : Low priority
+ //.myClass.myOtherClass : Highest priority
+ //[isAbstract=true] : Medium priority
+ //Styles should also be merged when they aren't conflicting (ie. [isAbstract] + .myClass -> fontName = Tunga)
+ Shape class3 = findShape("Class3");
+ Shape class5 = findShape("Class5");
+
+ testBlueStyle(class3); //isAbstract
+ testBlueStyle(class5); //isAbstract
+
+ Shape class4 = findShape("Class4");
+
+ testWhiteStyle(class4); //.myClass.myOtherClass (Overrides isAbstract)
+ testFontName(class4); //.myClass (Doesn't conflict with isAbstract)
+
+ Shape class6 = findShape("Class6");
+
+ testWhiteStyle(class6); //.myClass
+ testFontName(class6); //.myClass
+
+ Shape class7 = findShape("Class7");
+
+ testBlueStyle(class7); //isAbstract
+ testFontName(class7); //.myClass (Doesn't conflict with isAbstract)
+ }
+
+ private void testBlueStyle(Shape shape) {
+ Assert.assertEquals(rgb(195, 205, 255), shape.getFillColor()); //rgb syntax
+ Assert.assertTrue(shape.isBold());
+ Assert.assertNotNull(shape.getGradient());
+ }
+
+ private void testWhiteStyle(Shape shape) {
+ Assert.assertEquals(rgb(255, 255, 255), shape.getFillColor()); //White = #FFFFFF (Hexa syntax)
+ Assert.assertFalse(shape.isBold());
+ Assert.assertNull(shape.getGradient());
+ }
+
+ private void testFontName(Shape shape) {
+ Assert.assertEquals("Tunga", shape.getFontName());
+ }
+
+ @After
+ public void dispose() {
+ Iterator<Resource> iterator = diagram.eResource().getResourceSet().getResources().iterator();
+ while(iterator.hasNext()) {
+ iterator.next().unload();
+ iterator.remove();
+ }
+ }
+
+ private int rgb(int red, int green, int blue) {
+ return red | green << 8 | blue << 16;
+ }
+
+ 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/plugins/infra/gmfdiag/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
new file mode 100644
index 00000000000..c0fb3f6647a
--- /dev/null
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests/src/org/eclipse/papyrus/infra/gmfdiag/css/tests/tests/CSSSupportTest.java
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ * 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
+ * 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 org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.helper.CSSHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagram;
+import org.eclipse.papyrus.infra.gmfdiag.css.tests.Activator;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test the installation of CSS Support on a standard ResourceSet
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class CSSSupportTest {
+
+ /**
+ * Installs the CSS support on a resource set and check the results
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testCSSSupport() throws Exception {
+ //Resource set with CSS Support installed
+ ResourceSet resourceSetWithCSSSupport = new ResourceSetImpl();
+ CSSHelper.installCSSSupport(resourceSetWithCSSSupport);
+
+ URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/stylesheetTest/model.notation", true);
+
+ Diagram diagram = (Diagram)EMFHelper.loadEMFModel(resourceSetWithCSSSupport, uri);
+
+ //The diagram should be a CSSDiagram
+ Assert.assertTrue(diagram instanceof CSSDiagram);
+
+ CSSDiagram cssDiagram = (CSSDiagram)diagram;
+
+ //The CSSDiagram should have a CSSEngine
+ Assert.assertNotNull(cssDiagram.getEngine());
+
+ //Dispose the CSS Engine
+ resourceSetWithCSSSupport.getResources().remove(diagram.eResource());
+ }
+
+ /**
+ * Tests a standard resource set (without CSS support) and check the results.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testWithoutCSSSupport() throws Exception {
+ //Standard resource set (Without CSS Support installed)
+ ResourceSet resourceSetWithoutCSSSupport = new ResourceSetImpl();
+
+ URI uri = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/resources/model/stylesheetTest/model.notation", true);
+
+ Diagram diagram = (Diagram)EMFHelper.loadEMFModel(resourceSetWithoutCSSSupport, uri);
+
+ //The diagram should be a standard GMF Diagram (i.e. not a CSSDiagram)
+ Assert.assertFalse(diagram instanceof CSSDiagram);
+ }
+}

Back to the top