Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2015-01-27 09:42:03 +0000
committerCamille Letavernier2015-01-27 09:43:04 +0000
commitb40295e3bf768ecb7618dfd214804b861ca9ffe1 (patch)
tree116e3e6ac61fa77346089c89f93a40de01fe641e
parentd4aab3724ecd31bc3c9b57946dc00303a61ca22c (diff)
downloadorg.eclipse.papyrus-b40295e3bf768ecb7618dfd214804b861ca9ffe1.tar.gz
org.eclipse.papyrus-b40295e3bf768ecb7618dfd214804b861ca9ffe1.tar.xz
org.eclipse.papyrus-b40295e3bf768ecb7618dfd214804b861ca9ffe1.zip
384570: [CSS - Export] It should be possible to export a set ofcommitters/cletavernie/bug-384570-cssExport
stylesheets to create a Theme plug-in https://bugs.eclipse.org/bugs/show_bug.cgi?id=384570
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/.classpath8
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/.project28
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/META-INF/MANIFEST.MF26
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/about.html28
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/build.properties12
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/CSSExport.ctx35
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/CSSExtensionFactory.ecore10
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/CSSExtensionFactory.genmodel17
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/Environment.xmi9
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/ui/MultipleCSSStylesheet.xwt27
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/ui/SingleCSSStylesheet.xwt29
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/plugin.xml35
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/CSSStylesheet.java104
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/CsscustomizationFactory.java42
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/CsscustomizationPackage.java215
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/impl/CSSStylesheetImpl.java268
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/impl/CsscustomizationFactoryImpl.java94
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/impl/CsscustomizationPackageImpl.java205
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/util/CsscustomizationAdapterFactory.java156
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/util/CsscustomizationSwitch.java143
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/Activator.java69
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/factory/CSSExtensionFactory.java115
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/modelelement/CSSExportModelElement.java74
-rw-r--r--plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/modelelement/CSSExportModelElementFactory.java36
25 files changed, 1792 insertions, 0 deletions
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/.classpath b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/.classpath
new file mode 100644
index 00000000000..9c0318f0fd2
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <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/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/.project b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/.project
new file mode 100644
index 00000000000..a4d8fa2db8b
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.gmfdiag.css.export</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <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>
+ </natures>
+</projectDescription>
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/.settings/org.eclipse.jdt.core.prefs b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/.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/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/META-INF/MANIFEST.MF b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..d125a7f7104
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.customization;bundle-version="0.10.0",
+ org.eclipse.emf.ecore;bundle-version="2.8.0",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.0",
+ org.eclipse.papyrus.eclipse.project.editors;bundle-version="0.10.0",
+ org.eclipse.papyrus.views.properties;bundle-version="0.10.0",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ org.eclipse.papyrus.infra.widgets;bundle-version="0.10.0",
+ org.eclipse.papyrus.views.properties.model;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="0.10.0",
+ org.eclipse.emf.edit;bundle-version="2.8.0",
+ org.eclipse.emf.databinding;bundle-version="1.2.0"
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.10.0.qualifier
+Bundle-Name: CSS Export tools (Incubation)
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.export.Activat
+ or
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.export;sing
+ leton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/about.html b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/about.html
new file mode 100644
index 00000000000..209103075a7
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/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>November 14, 2008</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> \ No newline at end of file
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/build.properties b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/build.properties
new file mode 100644
index 00000000000..bc9cebec0a7
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/build.properties
@@ -0,0 +1,12 @@
+#
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ about.html
+jars.compile.order = .
+source.. = src-gen/,\
+ src/
+output.. = bin/
+src.includes = about.html
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/CSSExport.ctx b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/CSSExport.ctx
new file mode 100644
index 00000000000..32a27d7fce4
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/CSSExport.ctx
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ASCII"?>
+<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" name="csscustomization">
+ <dependencies href="ppe:/context/org.eclipse.papyrus.customization/Model/Customization/Customization.ctx#/"/>
+ <tabs label="csscustomization" id="csscustomization" priority="100">
+ <sections name="Single CSSStylesheet" sectionFile="ui/SingleCSSStylesheet.xwt">
+ <widget href="ui/SingleCSSStylesheet.xwt#/"/>
+ </sections>
+ <sections name="Multiple CSSStylesheet" sectionFile="ui/MultipleCSSStylesheet.xwt">
+ <widget href="ui/MultipleCSSStylesheet.xwt#/"/>
+ </sections>
+ </tabs>
+ <views name="Single CSSStylesheet" sections="//@tabs.0/@sections.0" automaticContext="true" datacontexts="//@dataContexts.0/@elements.0">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isSingleCSSStylesheet">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.views.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" name="className" value="CSSStylesheet"/>
+ <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/css/customization"/>
+ </constraints>
+ </views>
+ <views elementMultiplicity="-1" name="Multiple CSSStylesheet" sections="//@tabs.0/@sections.1" automaticContext="true" datacontexts="//@dataContexts.0/@elements.0">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isMultipleCSSStylesheet">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.views.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" name="className" value="CSSStylesheet"/>
+ <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/css/customization"/>
+ </constraints>
+ </views>
+ <dataContexts name="csscustomization" label="csscustomization">
+ <elements name="CSSStylesheet">
+ <properties name="theme" label="" description="The CSS Theme to which this stylesheet should be contributed. May be a reference to an existing theme, or the id of the new Theme."/>
+ <properties name="icon" label="" description="Specify an icon for the new theme (Optional)"/>
+ <properties name="label" description="Specify a label for the new Theme (Optional)"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.customization/Model/Customization/Customization.ctx#//@dataContexts.0/@elements.2"/>
+ </elements>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.css.export/model/Environment.xmi#//@modelElementFactories.0"/>
+ </dataContexts>
+</contexts:Context>
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/CSSExtensionFactory.ecore b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/CSSExtensionFactory.ecore
new file mode 100644
index 00000000000..3dfdf483ea2
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/CSSExtensionFactory.ecore
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="csscustomization" nsURI="http://www.eclipse.org/papyrus/css/customization"
+ nsPrefix="csscustomization">
+ <eClassifiers xsi:type="ecore:EClass" name="CSSStylesheet" eSuperTypes="../../org.eclipse.papyrus.customization/Model/Customization.ecore#//FileBasedCustomizableElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="theme" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="icon" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/CSSExtensionFactory.genmodel b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/CSSExtensionFactory.genmodel
new file mode 100644
index 00000000000..7b597dee38a
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/CSSExtensionFactory.genmodel
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen"
+ editDirectory="/org.eclipse.papyrus.infra.gmfdiag.css.export.edit/src-gen" editorDirectory="/org.eclipse.papyrus.infra.gmfdiag.css.export.editor/src-gen"
+ modelPluginID="org.eclipse.papyrus.infra.gmfdiag.css.export" modelName="CSSExtensionFactory"
+ testsDirectory="/org.eclipse.papyrus.infra.gmfdiag.css.export.tests/src-gen" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" copyrightFields="false" usedGenPackages="../../org.eclipse.papyrus.customization/Model/Customization.genmodel#//customizationplugin">
+ <foreignModel>CSSExtensionFactory.ecore</foreignModel>
+ <genPackages prefix="Csscustomization" basePackage="org.eclipse.papyrus.infra.gmfdiag.css.export"
+ disposableProviderFactory="true" ecorePackage="CSSExtensionFactory.ecore#/">
+ <genClasses ecoreClass="CSSExtensionFactory.ecore#//CSSStylesheet">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute CSSExtensionFactory.ecore#//CSSStylesheet/theme"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute CSSExtensionFactory.ecore#//CSSStylesheet/icon"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute CSSExtensionFactory.ecore#//CSSStylesheet/label"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/Environment.xmi b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/Environment.xmi
new file mode 100644
index 00000000000..8315f58244f
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/Environment.xmi
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ASCII"?>
+<environment:Environment
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:environment="http://www.eclipse.org/papyrus/properties/environment/0.9">
+ <modelElementFactories
+ name="CSS Export Model Element Factory"
+ factoryClass="org.eclipse.papyrus.infra.gmfdiag.css.export.modelelement.CSSExportModelElementFactory"/>
+</environment:Environment>
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/ui/MultipleCSSStylesheet.xwt b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/ui/MultipleCSSStylesheet.xwt
new file mode 100644
index 00000000000..0cbc164aa91
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/ui/MultipleCSSStylesheet.xwt
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringFileSelector
+ property="customization:FileBasedCustomizableElement:file" input="{Binding}"></ppe:StringFileSelector>
+ <ppe:StringCombo input="{Binding}"
+ property="csscustomization:CSSStylesheet:theme"></ppe:StringCombo>
+ </Composite>
+ <Group text="New theme">
+ <Group.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Group.layout>
+ <ppe:StringEditor input="{Binding}"
+ property="csscustomization:CSSStylesheet:label"></ppe:StringEditor>
+ <ppe:StringFileSelector allowFileSystem="true"
+ input="{Binding}" allowWorkspace="true"
+ property="csscustomization:CSSStylesheet:icon"></ppe:StringFileSelector>
+ </Group>
+</Composite> \ No newline at end of file
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/ui/SingleCSSStylesheet.xwt b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/ui/SingleCSSStylesheet.xwt
new file mode 100644
index 00000000000..6664387dd0a
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/model/ui/SingleCSSStylesheet.xwt
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:j="clr-namespace:java.lang">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringFileSelector
+ property="customization:FileBasedCustomizableElement:file" input="{Binding}"
+ customLabel="CSS File or UML Model"></ppe:StringFileSelector>
+ <ppe:StringCombo input="{Binding}"
+ property="csscustomization:CSSStylesheet:theme"></ppe:StringCombo>
+ </Composite>
+ <Group text="New theme">
+ <Group.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Group.layout>
+ <ppe:StringEditor input="{Binding}"
+ property="csscustomization:CSSStylesheet:label"></ppe:StringEditor>
+ <ppe:StringFileSelector allowFileSystem="true"
+ input="{Binding}" allowWorkspace="true"
+ property="csscustomization:CSSStylesheet:icon"></ppe:StringFileSelector>
+ </Group>
+</Composite> \ No newline at end of file
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/plugin.xml b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/plugin.xml
new file mode 100644
index 00000000000..ccf16f11ece
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/plugin.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://www.eclipse.org/papyrus/css/customization"
+ class="org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage"
+ genModel="model/CSSExtensionFactory.genmodel"/>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.customization.factory">
+ <factory
+ factory="org.eclipse.papyrus.infra.gmfdiag.css.export.factory.CSSExtensionFactory">
+ </factory>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.views.properties.context">
+ <context
+ contextModel="model/CSSExport.ctx"
+ isCustomizable="false">
+ </context>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.views.properties.environment">
+ <environment
+ environmentModel="model/Environment.xmi">
+ </environment>
+ </extension>
+
+</plugin>
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/CSSStylesheet.java b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/CSSStylesheet.java
new file mode 100644
index 00000000000..e4304c368ff
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/CSSStylesheet.java
@@ -0,0 +1,104 @@
+/**
+ */
+package org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization;
+
+import org.eclipse.papyrus.customization.model.customizationplugin.FileBasedCustomizableElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>CSS Stylesheet</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet#getTheme <em>Theme</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet#getIcon <em>Icon</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet#getLabel <em>Label</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage#getCSSStylesheet()
+ * @model
+ * @generated
+ */
+public interface CSSStylesheet extends FileBasedCustomizableElement {
+ /**
+ * Returns the value of the '<em><b>Theme</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Theme</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Theme</em>' attribute.
+ * @see #setTheme(String)
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage#getCSSStylesheet_Theme()
+ * @model required="true"
+ * @generated
+ */
+ String getTheme();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet#getTheme <em>Theme</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Theme</em>' attribute.
+ * @see #getTheme()
+ * @generated
+ */
+ void setTheme(String value);
+
+ /**
+ * Returns the value of the '<em><b>Icon</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Icon</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Icon</em>' attribute.
+ * @see #setIcon(String)
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage#getCSSStylesheet_Icon()
+ * @model
+ * @generated
+ */
+ String getIcon();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet#getIcon <em>Icon</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Icon</em>' attribute.
+ * @see #getIcon()
+ * @generated
+ */
+ void setIcon(String value);
+
+ /**
+ * Returns the value of the '<em><b>Label</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Label</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Label</em>' attribute.
+ * @see #setLabel(String)
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage#getCSSStylesheet_Label()
+ * @model
+ * @generated
+ */
+ String getLabel();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet#getLabel <em>Label</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Label</em>' attribute.
+ * @see #getLabel()
+ * @generated
+ */
+ void setLabel(String value);
+
+} // CSSStylesheet
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/CsscustomizationFactory.java b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/CsscustomizationFactory.java
new file mode 100644
index 00000000000..37a519bea6f
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/CsscustomizationFactory.java
@@ -0,0 +1,42 @@
+/**
+ */
+package org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage
+ * @generated
+ */
+public interface CsscustomizationFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CsscustomizationFactory eINSTANCE = org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl.CsscustomizationFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>CSS Stylesheet</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>CSS Stylesheet</em>'.
+ * @generated
+ */
+ CSSStylesheet createCSSStylesheet();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ CsscustomizationPackage getCsscustomizationPackage();
+
+} //CsscustomizationFactory
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/CsscustomizationPackage.java b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/CsscustomizationPackage.java
new file mode 100644
index 00000000000..eb98678e949
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/CsscustomizationPackage.java
@@ -0,0 +1,215 @@
+/**
+ */
+package org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.papyrus.customization.model.customizationplugin.CustomizationPluginPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface CsscustomizationPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "csscustomization";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/css/customization";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "csscustomization";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CsscustomizationPackage eINSTANCE = org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl.CsscustomizationPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl.CSSStylesheetImpl <em>CSS Stylesheet</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl.CSSStylesheetImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl.CsscustomizationPackageImpl#getCSSStylesheet()
+ * @generated
+ */
+ int CSS_STYLESHEET = 0;
+
+ /**
+ * The feature id for the '<em><b>File</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CSS_STYLESHEET__FILE = CustomizationPluginPackage.FILE_BASED_CUSTOMIZABLE_ELEMENT__FILE;
+
+ /**
+ * The feature id for the '<em><b>Theme</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CSS_STYLESHEET__THEME = CustomizationPluginPackage.FILE_BASED_CUSTOMIZABLE_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Icon</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CSS_STYLESHEET__ICON = CustomizationPluginPackage.FILE_BASED_CUSTOMIZABLE_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Label</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CSS_STYLESHEET__LABEL = CustomizationPluginPackage.FILE_BASED_CUSTOMIZABLE_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>CSS Stylesheet</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CSS_STYLESHEET_FEATURE_COUNT = CustomizationPluginPackage.FILE_BASED_CUSTOMIZABLE_ELEMENT_FEATURE_COUNT + 3;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet <em>CSS Stylesheet</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>CSS Stylesheet</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet
+ * @generated
+ */
+ EClass getCSSStylesheet();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet#getTheme <em>Theme</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Theme</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet#getTheme()
+ * @see #getCSSStylesheet()
+ * @generated
+ */
+ EAttribute getCSSStylesheet_Theme();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet#getIcon <em>Icon</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Icon</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet#getIcon()
+ * @see #getCSSStylesheet()
+ * @generated
+ */
+ EAttribute getCSSStylesheet_Icon();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet#getLabel <em>Label</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Label</em>'.
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet#getLabel()
+ * @see #getCSSStylesheet()
+ * @generated
+ */
+ EAttribute getCSSStylesheet_Label();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ CsscustomizationFactory getCsscustomizationFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl.CSSStylesheetImpl <em>CSS Stylesheet</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl.CSSStylesheetImpl
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl.CsscustomizationPackageImpl#getCSSStylesheet()
+ * @generated
+ */
+ EClass CSS_STYLESHEET = eINSTANCE.getCSSStylesheet();
+
+ /**
+ * The meta object literal for the '<em><b>Theme</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CSS_STYLESHEET__THEME = eINSTANCE.getCSSStylesheet_Theme();
+
+ /**
+ * The meta object literal for the '<em><b>Icon</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CSS_STYLESHEET__ICON = eINSTANCE.getCSSStylesheet_Icon();
+
+ /**
+ * The meta object literal for the '<em><b>Label</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CSS_STYLESHEET__LABEL = eINSTANCE.getCSSStylesheet_Label();
+
+ }
+
+} //CsscustomizationPackage
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/impl/CSSStylesheetImpl.java b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/impl/CSSStylesheetImpl.java
new file mode 100644
index 00000000000..1fb36804678
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/impl/CSSStylesheetImpl.java
@@ -0,0 +1,268 @@
+/**
+ */
+package org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.papyrus.customization.model.customizationplugin.impl.FileBasedCustomizableElementImpl;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>CSS Stylesheet</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl.CSSStylesheetImpl#getTheme <em>Theme</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl.CSSStylesheetImpl#getIcon <em>Icon</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl.CSSStylesheetImpl#getLabel <em>Label</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CSSStylesheetImpl extends FileBasedCustomizableElementImpl implements CSSStylesheet {
+ /**
+ * The default value of the '{@link #getTheme() <em>Theme</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTheme()
+ * @generated
+ * @ordered
+ */
+ protected static final String THEME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTheme() <em>Theme</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTheme()
+ * @generated
+ * @ordered
+ */
+ protected String theme = THEME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getIcon() <em>Icon</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIcon()
+ * @generated
+ * @ordered
+ */
+ protected static final String ICON_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getIcon() <em>Icon</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIcon()
+ * @generated
+ * @ordered
+ */
+ protected String icon = ICON_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getLabel() <em>Label</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLabel()
+ * @generated
+ * @ordered
+ */
+ protected static final String LABEL_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getLabel() <em>Label</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLabel()
+ * @generated
+ * @ordered
+ */
+ protected String label = LABEL_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CSSStylesheetImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CsscustomizationPackage.Literals.CSS_STYLESHEET;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTheme() {
+ return theme;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTheme(String newTheme) {
+ String oldTheme = theme;
+ theme = newTheme;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CsscustomizationPackage.CSS_STYLESHEET__THEME, oldTheme, theme));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getIcon() {
+ return icon;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIcon(String newIcon) {
+ String oldIcon = icon;
+ icon = newIcon;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CsscustomizationPackage.CSS_STYLESHEET__ICON, oldIcon, icon));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLabel(String newLabel) {
+ String oldLabel = label;
+ label = newLabel;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CsscustomizationPackage.CSS_STYLESHEET__LABEL, oldLabel, label));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case CsscustomizationPackage.CSS_STYLESHEET__THEME:
+ return getTheme();
+ case CsscustomizationPackage.CSS_STYLESHEET__ICON:
+ return getIcon();
+ case CsscustomizationPackage.CSS_STYLESHEET__LABEL:
+ return getLabel();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case CsscustomizationPackage.CSS_STYLESHEET__THEME:
+ setTheme((String)newValue);
+ return;
+ case CsscustomizationPackage.CSS_STYLESHEET__ICON:
+ setIcon((String)newValue);
+ return;
+ case CsscustomizationPackage.CSS_STYLESHEET__LABEL:
+ setLabel((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CsscustomizationPackage.CSS_STYLESHEET__THEME:
+ setTheme(THEME_EDEFAULT);
+ return;
+ case CsscustomizationPackage.CSS_STYLESHEET__ICON:
+ setIcon(ICON_EDEFAULT);
+ return;
+ case CsscustomizationPackage.CSS_STYLESHEET__LABEL:
+ setLabel(LABEL_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CsscustomizationPackage.CSS_STYLESHEET__THEME:
+ return THEME_EDEFAULT == null ? theme != null : !THEME_EDEFAULT.equals(theme);
+ case CsscustomizationPackage.CSS_STYLESHEET__ICON:
+ return ICON_EDEFAULT == null ? icon != null : !ICON_EDEFAULT.equals(icon);
+ case CsscustomizationPackage.CSS_STYLESHEET__LABEL:
+ return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (theme: ");
+ result.append(theme);
+ result.append(", icon: ");
+ result.append(icon);
+ result.append(", label: ");
+ result.append(label);
+ result.append(')');
+ return result.toString();
+ }
+
+} //CSSStylesheetImpl
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/impl/CsscustomizationFactoryImpl.java b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/impl/CsscustomizationFactoryImpl.java
new file mode 100644
index 00000000000..3d1ce644a54
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/impl/CsscustomizationFactoryImpl.java
@@ -0,0 +1,94 @@
+/**
+ */
+package org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationFactory;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CsscustomizationFactoryImpl extends EFactoryImpl implements CsscustomizationFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static CsscustomizationFactory init() {
+ try {
+ CsscustomizationFactory theCsscustomizationFactory = (CsscustomizationFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/css/customization");
+ if (theCsscustomizationFactory != null) {
+ return theCsscustomizationFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new CsscustomizationFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CsscustomizationFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case CsscustomizationPackage.CSS_STYLESHEET: return createCSSStylesheet();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CSSStylesheet createCSSStylesheet() {
+ CSSStylesheetImpl cssStylesheet = new CSSStylesheetImpl();
+ return cssStylesheet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CsscustomizationPackage getCsscustomizationPackage() {
+ return (CsscustomizationPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static CsscustomizationPackage getPackage() {
+ return CsscustomizationPackage.eINSTANCE;
+ }
+
+} //CsscustomizationFactoryImpl
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/impl/CsscustomizationPackageImpl.java b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/impl/CsscustomizationPackageImpl.java
new file mode 100644
index 00000000000..1026d1c3a27
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/impl/CsscustomizationPackageImpl.java
@@ -0,0 +1,205 @@
+/**
+ */
+package org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.customization.model.customizationplugin.CustomizationPluginPackage;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationFactory;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CsscustomizationPackageImpl extends EPackageImpl implements CsscustomizationPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass cssStylesheetEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private CsscustomizationPackageImpl() {
+ super(eNS_URI, CsscustomizationFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link CsscustomizationPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static CsscustomizationPackage init() {
+ if (isInited) return (CsscustomizationPackage)EPackage.Registry.INSTANCE.getEPackage(CsscustomizationPackage.eNS_URI);
+
+ // Obtain or create and register package
+ CsscustomizationPackageImpl theCsscustomizationPackage = (CsscustomizationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CsscustomizationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CsscustomizationPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ CustomizationPluginPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theCsscustomizationPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theCsscustomizationPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theCsscustomizationPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(CsscustomizationPackage.eNS_URI, theCsscustomizationPackage);
+ return theCsscustomizationPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCSSStylesheet() {
+ return cssStylesheetEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCSSStylesheet_Theme() {
+ return (EAttribute)cssStylesheetEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCSSStylesheet_Icon() {
+ return (EAttribute)cssStylesheetEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCSSStylesheet_Label() {
+ return (EAttribute)cssStylesheetEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CsscustomizationFactory getCsscustomizationFactory() {
+ return (CsscustomizationFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ cssStylesheetEClass = createEClass(CSS_STYLESHEET);
+ createEAttribute(cssStylesheetEClass, CSS_STYLESHEET__THEME);
+ createEAttribute(cssStylesheetEClass, CSS_STYLESHEET__ICON);
+ createEAttribute(cssStylesheetEClass, CSS_STYLESHEET__LABEL);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ CustomizationPluginPackage theCustomizationPluginPackage = (CustomizationPluginPackage)EPackage.Registry.INSTANCE.getEPackage(CustomizationPluginPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ cssStylesheetEClass.getESuperTypes().add(theCustomizationPluginPackage.getFileBasedCustomizableElement());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(cssStylesheetEClass, CSSStylesheet.class, "CSSStylesheet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getCSSStylesheet_Theme(), ecorePackage.getEString(), "theme", null, 1, 1, CSSStylesheet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCSSStylesheet_Icon(), ecorePackage.getEString(), "icon", null, 0, 1, CSSStylesheet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCSSStylesheet_Label(), ecorePackage.getEString(), "label", null, 0, 1, CSSStylesheet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //CsscustomizationPackageImpl
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/util/CsscustomizationAdapterFactory.java b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/util/CsscustomizationAdapterFactory.java
new file mode 100644
index 00000000000..c982282b5de
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/util/CsscustomizationAdapterFactory.java
@@ -0,0 +1,156 @@
+/**
+ */
+package org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.customization.model.customizationplugin.CustomizableElement;
+import org.eclipse.papyrus.customization.model.customizationplugin.FileBasedCustomizableElement;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage
+ * @generated
+ */
+public class CsscustomizationAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static CsscustomizationPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CsscustomizationAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = CsscustomizationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CsscustomizationSwitch<Adapter> modelSwitch =
+ new CsscustomizationSwitch<Adapter>() {
+ @Override
+ public Adapter caseCSSStylesheet(CSSStylesheet object) {
+ return createCSSStylesheetAdapter();
+ }
+ @Override
+ public Adapter caseCustomizableElement(CustomizableElement object) {
+ return createCustomizableElementAdapter();
+ }
+ @Override
+ public Adapter caseFileBasedCustomizableElement(FileBasedCustomizableElement object) {
+ return createFileBasedCustomizableElementAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet <em>CSS Stylesheet</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet
+ * @generated
+ */
+ public Adapter createCSSStylesheetAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.customization.model.customizationplugin.CustomizableElement <em>Customizable Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.customization.model.customizationplugin.CustomizableElement
+ * @generated
+ */
+ public Adapter createCustomizableElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.customization.model.customizationplugin.FileBasedCustomizableElement <em>File Based Customizable Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.customization.model.customizationplugin.FileBasedCustomizableElement
+ * @generated
+ */
+ public Adapter createFileBasedCustomizableElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //CsscustomizationAdapterFactory
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/util/CsscustomizationSwitch.java b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/util/CsscustomizationSwitch.java
new file mode 100644
index 00000000000..0d033b5ae17
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src-gen/org/eclipse/papyrus/infra/gmfdiag/css/export/csscustomization/util/CsscustomizationSwitch.java
@@ -0,0 +1,143 @@
+/**
+ */
+package org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.customization.model.customizationplugin.CustomizableElement;
+import org.eclipse.papyrus.customization.model.customizationplugin.FileBasedCustomizableElement;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage
+ * @generated
+ */
+public class CsscustomizationSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static CsscustomizationPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CsscustomizationSwitch() {
+ if (modelPackage == null) {
+ modelPackage = CsscustomizationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case CsscustomizationPackage.CSS_STYLESHEET: {
+ CSSStylesheet cssStylesheet = (CSSStylesheet)theEObject;
+ T result = caseCSSStylesheet(cssStylesheet);
+ if (result == null) result = caseFileBasedCustomizableElement(cssStylesheet);
+ if (result == null) result = caseCustomizableElement(cssStylesheet);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>CSS Stylesheet</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>CSS Stylesheet</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCSSStylesheet(CSSStylesheet object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Customizable Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Customizable Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCustomizableElement(CustomizableElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>File Based Customizable Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>File Based Customizable Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFileBasedCustomizableElement(FileBasedCustomizableElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //CsscustomizationSwitch
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/Activator.java b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/Activator.java
new file mode 100644
index 00000000000..dd0c37150c8
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/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.export;
+
+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.export"; //$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/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/factory/CSSExtensionFactory.java b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/factory/CSSExtensionFactory.java
new file mode 100644
index 00000000000..c3960b0a6aa
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/factory/CSSExtensionFactory.java
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ * 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.export.factory;
+
+import java.io.IOException;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.papyrus.customization.factory.FileBasedExtensionFactory;
+import org.eclipse.papyrus.customization.model.customizationplugin.CustomizableElement;
+import org.eclipse.papyrus.customization.model.customizationplugin.FileBasedCustomizableElement;
+import org.eclipse.papyrus.customization.plugin.PluginEditor;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CSSStylesheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage;
+import org.eclipse.papyrus.infra.gmfdiag.css.theme.ThemeManager;
+import org.w3c.dom.Element;
+
+
+public class CSSExtensionFactory extends FileBasedExtensionFactory {
+
+ protected final static String stylesheetContribution = "stylesheet"; //$NON-NLS-1$ //From oep.infra.gmfdiag.css.theme extension point
+
+ protected final static String themeDefinition = "themeDefinition"; //$NON-NLS-1$ //From oep.infra.gmfdiag.css.theme extension point
+
+ protected final static String themeIcon = "icon"; //$NON-NLS-1$ //From oep.infra.gmfdiag.css.theme extension point
+
+ protected final static String themeLabel = "label"; //$NON-NLS-1$ //From oep.infra.gmfdiag.css.theme extension point
+
+ protected final static String themeId = "id"; //$NON-NLS-1$ //From oep.infra.gmfdiag.css.theme extension point
+
+ public CSSExtensionFactory() {
+ super("CSS Theme", ThemeManager.EXTENSION_ID, "stylesheetPath", "themeContribution", true);
+ }
+
+ public EClass getCustomizableElementClass() {
+ return CsscustomizationPackage.eINSTANCE.getCSSStylesheet();
+ }
+
+ @Override
+ public void addElement(CustomizableElement element, PluginEditor editor) {
+ super.addElement(element, editor);
+ }
+
+ @Override
+ protected String getTargetPath(FileBasedCustomizableElement element) {
+ return "style/" + getFileName(element); //$NON-NLS-1$
+ }
+
+ @Override
+ protected Element createExtension(FileBasedCustomizableElement element, PluginEditor editor) {
+ Element themeContributionElement = null;
+ if(element instanceof CSSStylesheet) {
+ //Override the super implementation: The extension point structure has
+ //one more level than the super-implementation (css_theme > themeContribution > stylesheet)
+ CSSStylesheet stylesheetElement = (CSSStylesheet)element;
+
+ Element extension = editor.getPluginEditor().addExtension(extensionPoint); //cssTheme
+
+ //Optional: Create & configure the themeDefinition (New Theme)
+ if(ThemeManager.instance.getTheme(stylesheetElement.getTheme()) == null) {
+ createNewThemeExtension(stylesheetElement, editor, extension);
+ }
+
+ //Required: Create the Theme contribution
+ themeContributionElement = editor.getPluginEditor().addChild(extension, fileElementName);
+ Element cssContributionElement = editor.getPluginEditor().addChild(themeContributionElement, stylesheetContribution);
+
+ editor.getPluginEditor().setAttribute(cssContributionElement, fileAttributeName, getTargetPath(stylesheetElement));
+
+ //Configure the themeContribution
+ themeContributionElement.setAttribute(themeId, stylesheetElement.getTheme());
+ }
+
+ return themeContributionElement;
+ }
+
+ protected Element createNewThemeExtension(CSSStylesheet stylesheetElement, PluginEditor editor, Element extension) {
+ Element themeDefinitionElement = editor.getPluginEditor().addChild(extension, themeDefinition);
+
+ String iconPath = stylesheetElement.getIcon();
+ if(iconPath == null) {
+ throw new IllegalArgumentException("Icon path should not be empty");
+ }
+
+ String targetIconPath = getFileName(getTargetIconPath(stylesheetElement));
+ if(targetIconPath == null || targetIconPath.equals("")) {
+ throw new IllegalArgumentException("Icon path should not be empty");
+ }
+
+ try {
+ copyFile(iconPath, targetIconPath, editor);
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ }
+
+ editor.getPluginEditor().setAttribute(themeDefinitionElement, themeId, stylesheetElement.getTheme());
+ editor.getPluginEditor().setAttribute(themeDefinitionElement, themeIcon, targetIconPath);
+ editor.getPluginEditor().setAttribute(themeDefinitionElement, themeLabel, stylesheetElement.getLabel());
+
+ return themeDefinitionElement;
+ }
+
+ protected String getTargetIconPath(CSSStylesheet stylesheetElement) {
+ return "icons/" + getFileName(stylesheetElement.getIcon());
+ }
+}
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/modelelement/CSSExportModelElement.java b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/modelelement/CSSExportModelElement.java
new file mode 100644
index 00000000000..08a46db9587
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/modelelement/CSSExportModelElement.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * 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.export.modelelement;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.csscustomization.CsscustomizationPackage;
+import org.eclipse.papyrus.infra.gmfdiag.css.theme.Theme;
+import org.eclipse.papyrus.infra.gmfdiag.css.theme.ThemeManager;
+import org.eclipse.papyrus.infra.gmfdiag.css.theme.ThemeManager.EmptyTheme;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.StaticContentProvider;
+import org.eclipse.papyrus.views.properties.modelelement.EMFModelElement;
+
+
+public class CSSExportModelElement extends EMFModelElement {
+
+ /**
+ *
+ * Constructs a new CSSExportModelElement for the given EObject
+ *
+ * @param source
+ */
+ public CSSExportModelElement(EObject source) {
+ super(source);
+ }
+
+ /**
+ *
+ * Constructs a new CSSExportModelElement for the given EObject and Editing Domain
+ *
+ * @param source
+ * @param domain
+ */
+ public CSSExportModelElement(EObject source, EditingDomain domain) {
+ super(source, domain);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IStaticContentProvider getContentProvider(String propertyPath) {
+ EStructuralFeature feature = getFeature(propertyPath);
+ if(feature == CsscustomizationPackage.eINSTANCE.getCSSStylesheet_Theme()) {
+ List<Theme> allThemes = ThemeManager.instance.getThemes();
+ String[] themeIds = new String[allThemes.size() - 1]; //-1 to ignore the EmptyTheme
+
+ int i = 0;
+ for(Theme theme : allThemes) {
+ if(theme != EmptyTheme.instance) {
+ themeIds[i++] = theme.getId();
+ }
+ }
+
+ return new StaticContentProvider(themeIds);
+ }
+
+ return super.getContentProvider(propertyPath);
+ }
+
+}
diff --git a/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/modelelement/CSSExportModelElementFactory.java b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/modelelement/CSSExportModelElementFactory.java
new file mode 100644
index 00000000000..4aa132ea1a5
--- /dev/null
+++ b/plugins/customization/org.eclipse.papyrus.infra.gmfdiag.css.export/src/org/eclipse/papyrus/infra/gmfdiag/css/export/modelelement/CSSExportModelElementFactory.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * 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.export.modelelement;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.css.export.Activator;
+import org.eclipse.papyrus.views.properties.contexts.DataContextElement;
+import org.eclipse.papyrus.views.properties.modelelement.ModelElement;
+import org.eclipse.papyrus.views.properties.modelelement.ModelElementFactory;
+
+
+public class CSSExportModelElementFactory implements ModelElementFactory {
+
+ public ModelElement createFromSource(Object sourceElement, DataContextElement context) {
+ EObject source = EMFHelper.getEObject(sourceElement);
+ if(source == null) {
+ Activator.log.warn("Unable to resolve the selected element to an EObject"); //$NON-NLS-1$
+ return null;
+ }
+
+ EditingDomain domain = EMFHelper.resolveEditingDomain(source);
+ return new CSSExportModelElement(source, domain);
+ }
+
+}

Back to the top