Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-04-30 14:48:39 +0000
committerGerrit Code Review @ Eclipse.org2014-04-30 14:48:39 +0000
commit32d85897a1d4f54cee0b4fd6a2f2acacea7c8123 (patch)
treee27efe755d0b6e0c6b539a608771c5496f043679 /plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model
parent190d0e647824c735f1a1bd4095daa6ca6eb89f09 (diff)
parenta174352dd68d69367bcb468722a0bd0938802e2a (diff)
downloadorg.eclipse.papyrus-32d85897a1d4f54cee0b4fd6a2f2acacea7c8123.tar.gz
org.eclipse.papyrus-32d85897a1d4f54cee0b4fd6a2f2acacea7c8123.tar.xz
org.eclipse.papyrus-32d85897a1d4f54cee0b4fd6a2f2acacea7c8123.zip
Merge "430079: [CSS] Papyrus shall provide features to define local theme https://bugs.eclipse.org/bugs/show_bug.cgi?id=430079"
Diffstat (limited to 'plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/Environment.xmi27
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/css.ctx194
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleTheme.xwt32
3 files changed, 146 insertions, 107 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/Environment.xmi b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/Environment.xmi
index 4f5fe3cf2fa..d610db8ed4e 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/Environment.xmi
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/Environment.xmi
@@ -1,19 +1,8 @@
-<?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 CustomStyle Factory"
- factoryClass="org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement.CSSModelElementFactory"/>
- <modelElementFactories
- name="CSS Preferences"
- factoryClass="org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement.CSSPreferencesModelElementFactory"/>
- <widgetTypes
- label="CSS ResetStyle Button"
- widgetClass="ResetStyleWidget"
- namespace="//@namespaces.0"/>
- <namespaces
- name="css"
- value="org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets"/>
-</environment:Environment>
+<?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 CustomStyle Factory" factoryClass="org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement.CSSModelElementFactory"/>
+ <modelElementFactories name="CSS Preferences" factoryClass="org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement.CSSPreferencesModelElementFactory"/>
+ <modelElementFactories name="CSS Themes" factoryClass="org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement.CSSThemesModelElementFactory"/>
+ <widgetTypes label="CSS ResetStyle Button" widgetClass="ResetStyleWidget" namespace="//@namespaces.0"/>
+ <namespaces name="css" value="org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets"/>
+</environment:Environment>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/css.ctx b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/css.ctx
index 6b4fb350795..f8cbcf7a6f6 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/css.ctx
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/css.ctx
@@ -1,88 +1,106 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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="CSS">
- <tabs label="Style" id="style" category="org.eclipse.papyrus" image="" priority="70">
- <sections name="SingleStylableElement" sectionFile="ui/SingleStylableElement.xwt">
- <widget href="ui/SingleStylableElement.xwt#/"/>
- </sections>
- <sections name="MultipleStylableElement" sectionFile="ui/MultipleStylableElement.xwt">
- <widget href="ui/MultipleStylableElement.xwt#/"/>
- </sections>
- <sections name="SingleDiagram" sectionFile="ui/SingleDiagram.xwt">
- <widget href="ui/SingleDiagram.xwt#/"/>
- </sections>
- <sections name="SingleStyleSheetReference" sectionFile="ui/SingleStyleSheetReference.xwt">
- <widget href="ui/SingleStyleSheetReference.xwt#//@widgets.0"/>
- </sections>
- <sections name="SingleEmbeddedStyleSheet" sectionFile="ui/SingleEmbeddedStyleSheet.xwt">
- <widget href="ui/SingleEmbeddedStyleSheet.xwt#//@widgets.0"/>
- </sections>
- </tabs>
- <views name="SingleStylableElement" sections="//@tabs.0/@sections.0">
- <constraints xsi:type="constraints:SimpleConstraint" name="isSingleStylableElement" overrideable="false" overriddenConstraints="//@views.1/@constraints.0">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
- <properties xsi:type="constraints:ValueProperty" name="className" value="View"/>
- </constraints>
- </views>
- <views elementMultiplicity="-1" name="MultipleStylableElement" sections="//@tabs.0/@sections.1">
- <constraints xsi:type="constraints:SimpleConstraint" name="isMultipleStylableElement" overrideable="false">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
- <properties xsi:type="constraints:ValueProperty" name="className" value="View"/>
- </constraints>
- </views>
- <views name="Diagram" sections="//@tabs.0/@sections.2">
- <constraints xsi:type="constraints:SimpleConstraint" name="isDiagram" overrideable="false" overriddenConstraints="//@views.0/@constraints.0 //@views.1/@constraints.0">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
- <properties xsi:type="constraints:ValueProperty" name="className" value="Diagram"/>
- </constraints>
- </views>
- <views name="SingleStyleSheetReference" sections="//@tabs.0/@sections.3">
- <constraints xsi:type="constraints:SimpleConstraint" name="isStyleSheetReference">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/infra/gmfdiag/css"/>
- <properties xsi:type="constraints:ValueProperty" name="className" value="StyleSheetReference"/>
- </constraints>
- </views>
- <views name="SingleEmbeddedStyleSheet" sections="//@tabs.0/@sections.4">
- <constraints xsi:type="constraints:SimpleConstraint" name="isEmbeddedStyleSheet">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/infra/gmfdiag/css"/>
- <properties xsi:type="constraints:ValueProperty" name="className" value="EmbeddedStyleSheet"/>
- </constraints>
- </views>
- <dataContexts name="CSS" label="CSS">
- <elements name="PapyrusCSSStyle">
- <properties name="cssId" label="CSS ID" description="The CSS ID of this element. The ID should be unique within a Diagram. It can be used to retrieve the style properties applied to this element."/>
- <properties name="cssClass" label="CSS Classes" multiplicity="-1" description="The list of CSS Classes associated to this element. Classes are string identifiers, used by the CSS Stylesheets to identify a set of elements on which styles should be applied."/>
- <properties name="cssStyle" label="CSS Style" description="The list of CSS properties applied to this element. This is a local style, which will only be applied on the selected element."/>
- </elements>
- <elements name="DiagramStyle" supertypes="//@dataContexts.0/@elements.0">
- <properties name="css_stylesheets" label="Diagram style sheets" type="Reference" multiplicity="-1" description="The style sheets associated to this diagram"/>
- </elements>
- <elements name="ModelStyle">
- <properties name="modelStyleSheets" label="Model style sheets" type="Reference" multiplicity="-1" description="The style sheets associated to this model"/>
- </elements>
- <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/Environment.xmi#//@modelElementFactories.0"/>
- </dataContexts>
- <dataContexts name="modelstylesheets" label="StyleSheets">
- <elements name="StyleSheetReference">
- <properties name="path" label="Path" description="The path to an external style sheet file"/>
- </elements>
- <elements name="EmbeddedStyleSheet">
- <properties name="label" label="" description="The stylesheet's label"/>
- <properties name="content" label="Contents" description="The style sheet contents"/>
- </elements>
- <elements name="ModelStyleSheet">
- <properties name="stylesheets" label="Model style sheets" type="Reference" multiplicity="-1" description="The style sheets associated to the model"/>
- </elements>
- <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.views.properties/model/Environment.xmi#//@modelElementFactories.0"/>
- </dataContexts>
- <dataContexts name="Preferences" label="Preferences">
- <elements name="org.eclipse.papyrus.infra.gmfdiag.css">
- <properties name="currentTheme" label="" description="The theme currently applied to all Papyrus Diagrams in your workspace. The theme can be changed in the preferences."/>
- </elements>
- <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/Environment.xmi#//@modelElementFactories.1"/>
- </dataContexts>
-</contexts:Context>
+<?xml version="1.0" encoding="UTF-8"?>
+<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="CSS">
+ <tabs label="Style" id="style" category="org.eclipse.papyrus" image="" priority="70">
+ <sections name="SingleStylableElement" sectionFile="ui/SingleStylableElement.xwt">
+ <widget href="ui/SingleStylableElement.xwt#/"/>
+ </sections>
+ <sections name="MultipleStylableElement" sectionFile="ui/MultipleStylableElement.xwt">
+ <widget href="ui/MultipleStylableElement.xwt#/"/>
+ </sections>
+ <sections name="SingleDiagram" sectionFile="ui/SingleDiagram.xwt">
+ <widget href="ui/SingleDiagram.xwt#/"/>
+ </sections>
+ <sections name="SingleStyleSheetReference" sectionFile="ui/SingleStyleSheetReference.xwt">
+ <widget href="ui/SingleStyleSheetReference.xwt#//@widgets.0"/>
+ </sections>
+ <sections name="SingleEmbeddedStyleSheet" sectionFile="ui/SingleEmbeddedStyleSheet.xwt">
+ <widget href="ui/SingleEmbeddedStyleSheet.xwt#//@widgets.0"/>
+ </sections>
+ <sections name="SingleTheme" sectionFile="ui/SingleTheme.xwt">
+ <widget href="ui/SingleTheme.xwt#/"/>
+ </sections>
+ </tabs>
+ <views name="SingleStylableElement" sections="//@tabs.0/@sections.0">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isSingleStylableElement" overrideable="false" overriddenConstraints="//@views.1/@constraints.0">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
+ <properties xsi:type="constraints:ValueProperty" name="className" value="View"/>
+ </constraints>
+ </views>
+ <views elementMultiplicity="-1" name="MultipleStylableElement" sections="//@tabs.0/@sections.1">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isMultipleStylableElement" overrideable="false">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
+ <properties xsi:type="constraints:ValueProperty" name="className" value="View"/>
+ </constraints>
+ </views>
+ <views name="Diagram" sections="//@tabs.0/@sections.2">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isDiagram" overrideable="false" overriddenConstraints="//@views.0/@constraints.0 //@views.1/@constraints.0">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
+ <properties xsi:type="constraints:ValueProperty" name="className" value="Diagram"/>
+ </constraints>
+ </views>
+ <views name="SingleStyleSheetReference" sections="//@tabs.0/@sections.3">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isStyleSheetReference">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/infra/gmfdiag/css"/>
+ <properties xsi:type="constraints:ValueProperty" name="className" value="StyleSheetReference"/>
+ </constraints>
+ </views>
+ <views name="SingleEmbeddedStyleSheet" sections="//@tabs.0/@sections.4">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isEmbeddedStyleSheet">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/infra/gmfdiag/css"/>
+ <properties xsi:type="constraints:ValueProperty" name="className" value="EmbeddedStyleSheet"/>
+ </constraints>
+ </views>
+ <views name="SingleTheme" sections="//@tabs.0/@sections.5">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isTheme">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.constraints/Model/ConstraintEnvironment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/papyrus/infra/gmfdiag/css"/>
+ <properties xsi:type="constraints:ValueProperty" name="className" value="Theme"/>
+ </constraints>
+ </views>
+ <dataContexts name="CSS" label="CSS">
+ <elements name="PapyrusCSSStyle">
+ <properties name="cssId" label="CSS ID" description="The CSS ID of this element. The ID should be unique within a Diagram. It can be used to retrieve the style properties applied to this element."/>
+ <properties name="cssClass" label="CSS Classes" multiplicity="-1" description="The list of CSS Classes associated to this element. Classes are string identifiers, used by the CSS Stylesheets to identify a set of elements on which styles should be applied."/>
+ <properties name="cssStyle" label="CSS Style" description="The list of CSS properties applied to this element. This is a local style, which will only be applied on the selected element."/>
+ </elements>
+ <elements name="DiagramStyle" supertypes="//@dataContexts.0/@elements.0">
+ <properties name="css_stylesheets" label="Diagram style sheets" type="Reference" multiplicity="-1" description="The style sheets associated to this diagram"/>
+ </elements>
+ <elements name="ModelStyle">
+ <properties name="modelStyleSheets" label="Model style sheets" type="Reference" multiplicity="-1" description="The style sheets associated to this model"/>
+ </elements>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/Environment.xmi#//@modelElementFactories.0"/>
+ </dataContexts>
+ <dataContexts name="WorkspaceThemes" label="Themes">
+ <elements name="Theme">
+ <properties name="label" label="Label" description="Theme label"/>
+ <properties name="icon" label="Icon" description="Theme icon"/>
+ <properties name="stylesheets" label="Theme style sheets" type="Reference" multiplicity="-1"/>
+ </elements>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/Environment.xmi#//@modelElementFactories.2"/>
+ </dataContexts>
+ <dataContexts name="modelstylesheets" label="StyleSheets">
+ <elements name="StyleSheetReference">
+ <properties name="path" label="Path" description="The path to an external style sheet file"/>
+ </elements>
+ <elements name="EmbeddedStyleSheet">
+ <properties name="label" label="" description="The stylesheet's label"/>
+ <properties name="content" label="Contents" description="The style sheet contents"/>
+ </elements>
+ <elements name="ModelStyleSheet">
+ <properties name="stylesheets" label="Model style sheets" type="Reference" multiplicity="-1" description="The style sheets associated to the model"/>
+ </elements>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.views.properties/model/Environment.xmi#//@modelElementFactories.0"/>
+ </dataContexts>
+ <dataContexts name="Preferences" label="Preferences">
+ <elements name="org.eclipse.papyrus.infra.gmfdiag.css">
+ <properties name="currentTheme" label="" description="The theme currently applied to all Papyrus Diagrams in your workspace. The theme can be changed in the preferences."/>
+ </elements>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/Environment.xmi#//@modelElementFactories.1"/>
+ </dataContexts>
+</contexts:Context>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleTheme.xwt b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleTheme.xwt
new file mode 100644
index 00000000000..ddcb484a7ef
--- /dev/null
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleTheme.xwt
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="WorkspaceThemes:Theme:label"></ppe:StringEditor>
+ <ppe:BrowseFilePropertyEditor input="{Binding}"
+ buttonLabel="Browse..." property="WorkspaceThemes:Theme:icon">
+ <ppe:BrowseFilePropertyEditor.filterNames>
+ <x:Array Type="j:String">
+ <j:String>All images</j:String>
+ <j:String>PNG Icon</j:String>
+ <j:String>GIF Icon</j:String>
+ <j:String>JPEG Icon</j:String>
+ </x:Array>
+ </ppe:BrowseFilePropertyEditor.filterNames>
+ <ppe:BrowseFilePropertyEditor.filterExtensions>
+ <x:Array Type="j:String">
+ <j:String>*.gif;*.png;*.jpeg</j:String>
+ <j:String>*.png</j:String>
+ <j:String>*.gif</j:String>
+ <j:String>*.jpeg</j:String>
+ </x:Array>
+ </ppe:BrowseFilePropertyEditor.filterExtensions>
+ </ppe:BrowseFilePropertyEditor>
+ <ppe:MultiReference input="{Binding}"
+ property="WorkspaceThemes:Theme:stylesheets"></ppe:MultiReference>
+</Composite> \ No newline at end of file

Back to the top