Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2016-02-11 02:48:20 +0000
committerGerrit Code Review @ Eclipse.org2016-02-12 15:31:41 +0000
commitecd4928b327f5561364c5068c9ff5f1668e92d13 (patch)
tree7c34f46cf82a1d65ac753fa92c2a5d55371b8dba /plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties
parent751a204d74e15eb2db6b41c937691fc56dcc1252 (diff)
downloadorg.eclipse.papyrus-ecd4928b327f5561364c5068c9ff5f1668e92d13.tar.gz
org.eclipse.papyrus-ecd4928b327f5561364c5068c9ff5f1668e92d13.tar.xz
org.eclipse.papyrus-ecd4928b327f5561364c5068c9ff5f1668e92d13.zip
Bug 485220: [Architecture] Provide a more modular architecture
https://bugs.eclipse.org/bugs/show_bug.cgi?id=485220 Factor UI dependencies out of the UML Element Types bundle. This includes moving some advices that interact with the user into a new org.eclipse.papyrus.uml.service.types.ui bundle. Pull up the PasteCommandService and IPasteCommandProvider API into the Infra Diagram layer where the extension point is defined. Deprecate the old API in the UML layer. Introduce a service for participation of languages in CSS styling: * styling reset actions in the Reset Style command * access to semantic model classes and properties to make available to CSS Factor PapyrusObservableValue and cohorts out of the UML Tools bundle into the Infra Layer for more general reuse and to relieve the Diagram Infrastructure layer of UML dependencies. The old API remains as deprecated. Remove the Infra Diagram Layer dependency on UML Layer for property testers governing deletion in the diagram. Includes introduction of a new IGraphicalDeletionHelper OSGi service for delegation of the determination of whether an element can be deleted from the diagram and replacement of the XML expression properties * org.eclipse.papyrus.uml.diagram.common.isSemanticDeletion * org.eclipse.papyrus.uml.diagram.common.isReadOnly by * org.eclipse.papyrus.infra.gmfdiag.common.isSemanticDeletion * org.eclipse.papyrus.infra.gmfdiag.common.canDelete (where the latter is the negation of the property that it supersedes) Extract UML dependencies from the Diagram Outline and CSS Editor bundles. Remove unused MDTUtil APIs that referenced a UML-specific annotation. Move the Diagram Infrastructure CSS Palette bundle into the UML layer because it serves to provide extensions on the Palette Service, which is an overtly UML-specific capability. All client APIs for the Properties View are moved from org.eclipse.papyrus.views.properties bundle to a new org.eclipse.papyrus.infra.properties.ui bundle. This includes renaming of: * extension points * label-provider contexts * XWT namespaces Add an "all UI tests" suite. Define a componentized hierarchical build layout of the main plug-ins Change-Id: I43f8f3644857a18b69715f5a2f1da9b1cf286d67
Diffstat (limited to 'plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF79
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/css.ctx2
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/MultipleStylableElement.xwt22
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleDiagram.xwt76
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleEmbeddedStyleSheet.xwt34
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStylableElement.xwt44
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStyleSheetReference.xwt60
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleTheme.xwt4
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/pom.xml10
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/StyleSheetFactory.java150
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/ThemePropertyEditorFactory.java4
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java2
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElement.java70
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElementFactory.java54
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElement.java4
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElementFactory.java4
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java2
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java2
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/widgets/ResetStyleWidget.java192
19 files changed, 406 insertions, 409 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF
index ece79d60fc2..83ce4dc8841 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/META-INF/MANIFEST.MF
@@ -1,40 +1,39 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.properties.creation,
- org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding,
- org.eclipse.papyrus.infra.gmfdiag.css.properties.provider
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.views.properties;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.properties;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.emf.edit;bundle-version="2.8.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.core.databinding;bundle-version="1.4.1",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
- org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.2.0",
- org.eclipse.emf.databinding;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.gmfdiag.properties;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
- org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
- org.eclipse.e4.ui.css.core;bundle-version="0.10.0",
- org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="1.2.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
-Bundle-Vendor: Eclipse Modeling Project
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: CSS Properties
-Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.properties.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.properties;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.infra.gmfdiag.css.properties.creation,
+ org.eclipse.papyrus.infra.gmfdiag.css.properties.databinding,
+ org.eclipse.papyrus.infra.gmfdiag.css.properties.provider
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.properties.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.properties;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.emf.edit;bundle-version="2.8.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="1.2.0",
+ org.eclipse.emf.databinding;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.properties;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.css.model;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
+ org.eclipse.e4.ui.css.core;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="1.2.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
+Bundle-Vendor: Eclipse Modeling Project
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: CSS Properties
+Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.css.properties.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.css.properties;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
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 7acab6a523e..1b6ded15f5c 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
@@ -95,7 +95,7 @@
<elements xmi:id="_8MrCVIk1EeWBadfj_-2HEQ" name="ModelStyleSheet">
<properties xmi:id="_8MrCVYk1EeWBadfj_-2HEQ" 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"/>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@modelElementFactories.0"/>
</dataContexts>
<dataContexts xmi:id="_8MrCVok1EeWBadfj_-2HEQ" name="Preferences" label="Preferences">
<elements xmi:id="_8MrCV4k1EeWBadfj_-2HEQ" name="org.eclipse.papyrus.infra.gmfdiag.css">
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/MultipleStylableElement.xwt b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/MultipleStylableElement.xwt
index 40dbfbfbce4..b5c6f7de370 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/MultipleStylableElement.xwt
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/MultipleStylableElement.xwt
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite
- xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets"
- xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:x="http://www.eclipse.org/xwt">
- <Composite.layout>
- <GridLayout numColumns="1"></GridLayout>
- </Composite.layout>
- <css:ResetStyleWidget input="{Binding}" property="CSS:PapyrusCSSStyle:cssStyle"></css:ResetStyleWidget>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite
+ xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <GridLayout numColumns="1"></GridLayout>
+ </Composite.layout>
+ <css:ResetStyleWidget input="{Binding}" property="CSS:PapyrusCSSStyle:cssStyle"></css:ResetStyleWidget>
</Composite> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleDiagram.xwt b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleDiagram.xwt
index 4361f29795b..a2f377c116c 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleDiagram.xwt
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleDiagram.xwt
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:x="http://www.eclipse.org/xwt"
- xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets">
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringLabel input="{Binding}"
- property="Preferences:org.eclipse.papyrus.infra.gmfdiag.css:currentTheme"></ppe:StringLabel>
- </Composite>
- <Composite>
- <Composite.layout>
- <GridLayout></GridLayout>
- </Composite.layout>
- <css:ResetStyleWidget property="CSS:PapyrusCSSStyle:cssStyle"
- input="{Binding}"></css:ResetStyleWidget>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiReference input="{Binding}"
- property="CSS:DiagramStyle:css_stylesheets"></ppe:MultiReference>
- <ppe:MultiReference input="{Binding}"
- property="CSS:ModelStyle:modelStyleSheets"></ppe:MultiReference>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiString input="{Binding}" property="CSS:PapyrusCSSStyle:cssClass"></ppe:MultiString>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringLabel input="{Binding}"
+ property="Preferences:org.eclipse.papyrus.infra.gmfdiag.css:currentTheme"></ppe:StringLabel>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <GridLayout></GridLayout>
+ </Composite.layout>
+ <css:ResetStyleWidget property="CSS:PapyrusCSSStyle:cssStyle"
+ input="{Binding}"></css:ResetStyleWidget>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}"
+ property="CSS:DiagramStyle:css_stylesheets"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="CSS:ModelStyle:modelStyleSheets"></ppe:MultiReference>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiString input="{Binding}" property="CSS:PapyrusCSSStyle:cssClass"></ppe:MultiString>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleEmbeddedStyleSheet.xwt b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleEmbeddedStyleSheet.xwt
index 0af8d6e26c4..da0c1115779 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleEmbeddedStyleSheet.xwt
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleEmbeddedStyleSheet.xwt
@@ -1,18 +1,18 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:x="http://www.eclipse.org/xwt"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns="http://www.eclipse.org/xwt/presentation">
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringEditor input="{Binding}"
- property="modelstylesheets:EmbeddedStyleSheet:label"></ppe:StringEditor>
- <ppe:StringMultiline input="{Binding}"
- property="modelstylesheets:EmbeddedStyleSheet:content"></ppe:StringMultiline>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}"
+ property="modelstylesheets:EmbeddedStyleSheet:label"></ppe:StringEditor>
+ <ppe:StringMultiline input="{Binding}"
+ property="modelstylesheets:EmbeddedStyleSheet:content"></ppe:StringMultiline>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStylableElement.xwt b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStylableElement.xwt
index 827e0614086..69bb939acd8 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStylableElement.xwt
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStylableElement.xwt
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:x="http://www.eclipse.org/xwt"
- xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets"
- xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets">
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <GridLayout></GridLayout>
- </Composite.layout>
- <css:ResetStyleWidget input="{Binding}" property="CSS:PapyrusCSSStyle:cssStyle"></css:ResetStyleWidget>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiString input="{Binding}" property="CSS:PapyrusCSSStyle:cssClass"
- customLabel="Applied styles"></ppe:MultiString>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:css="clr-namespace:org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <GridLayout></GridLayout>
+ </Composite.layout>
+ <css:ResetStyleWidget input="{Binding}" property="CSS:PapyrusCSSStyle:cssStyle"></css:ResetStyleWidget>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiString input="{Binding}" property="CSS:PapyrusCSSStyle:cssClass"
+ customLabel="Applied styles"></ppe:MultiString>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStyleSheetReference.xwt b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStyleSheetReference.xwt
index 4be65ab7b03..a6cd887e55f 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStyleSheetReference.xwt
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleStyleSheetReference.xwt
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:x="http://www.eclipse.org/xwt"
- xmlns:j="clr-namespace:java.lang"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns="http://www.eclipse.org/xwt/presentation">
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringFileSelector allowFileSystem="false"
- input="{Binding}" allowWorkspace="true"
- property="modelstylesheets:StyleSheetReference:path">
- <ppe:StringFileSelector.filterNames>
- <x:Array Type="j:String">
- <j:String>CSS Stylesheets</j:String>
- <j:String>All</j:String>
- </x:Array>
- </ppe:StringFileSelector.filterNames>
- <ppe:StringFileSelector.filterExtensions>
- <x:Array Type="j:String">
- <j:String>*.css</j:String>
- <j:String>*</j:String>
- </x:Array>
- </ppe:StringFileSelector.filterExtensions>
- </ppe:StringFileSelector>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
+ xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:j="clr-namespace:java.lang"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringFileSelector allowFileSystem="false"
+ input="{Binding}" allowWorkspace="true"
+ property="modelstylesheets:StyleSheetReference:path">
+ <ppe:StringFileSelector.filterNames>
+ <x:Array Type="j:String">
+ <j:String>CSS Stylesheets</j:String>
+ <j:String>All</j:String>
+ </x:Array>
+ </ppe:StringFileSelector.filterNames>
+ <ppe:StringFileSelector.filterExtensions>
+ <x:Array Type="j:String">
+ <j:String>*.css</j:String>
+ <j:String>*</j:String>
+ </x:Array>
+ </ppe:StringFileSelector.filterExtensions>
+ </ppe:StringFileSelector>
+ </Composite>
</Composite> \ No newline at end of file
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
index cb7b2c841c5..358cc9713ab 100644
--- 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
@@ -1,8 +1,8 @@
<?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:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"
xmlns:x="http://www.eclipse.org/xwt">
<Composite.layout>
<ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/pom.xml b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/pom.xml
index 6325c35a37f..c4eca1b9958 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/pom.xml
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/pom.xml
@@ -2,13 +2,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>org.eclipse.papyrus.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../../../../../releng/main</relativePath>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra-gmfdiag-css</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.infra.gmfdiag.css.properties</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/StyleSheetFactory.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/StyleSheetFactory.java
index 708bc39b6a7..dcc8af32a7d 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/StyleSheetFactory.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/StyleSheetFactory.java
@@ -1,75 +1,75 @@
-/*****************************************************************************
- * 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.properties.creation;
-
-import java.util.Collection;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
-import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage;
-import org.eclipse.papyrus.infra.widgets.creation.IAtomicOperationExecutor;
-import org.eclipse.papyrus.views.properties.creation.EcorePropertyEditorFactory;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * A Factory for creating StyleSheets directly in the resource. It is not
- * contained in an EObject.
- *
- * @author Camille Letavernier
- */
-public class StyleSheetFactory extends EcorePropertyEditorFactory {
-
- protected View context;
-
- public StyleSheetFactory(View context) {
- super(NotationPackage.eINSTANCE.getEObjectListValueStyle_EObjectListValue());
- this.type = StylesheetsPackage.eINSTANCE.getStyleSheet();
- this.context = context;
- }
-
- @Override
- protected EObject createObjectInDifferentContainer(Control widget) {
- // The EObject is simply created ; it isn't stored anywhere (yet)
- // @see #validateObjects(Collection)
- return simpleCreateObject(widget);
- }
-
- /**
- * @see org.eclipse.papyrus.views.properties.creation.PropertyEditorFactory#getOperationExecutor(java.lang.Object)
- *
- * @param context
- * @return
- */
- @Override
- public IAtomicOperationExecutor getOperationExecutor(Object context) {
- if (context instanceof StyleSheet) {
- StyleSheet stylesheet = (StyleSheet) context;
- if (stylesheet.eResource() == null) {
- // Bug 468345: Use the current Notation::view instead, since we're creating the stylesheet in this object's resource
- // Ensure that further edition occurs in a proper nested transaction
- return super.getOperationExecutor(this.context);
- }
- }
-
- return super.getOperationExecutor(context);
- }
-
- /**
- * Return the objects as-is. The factory is not responsible for storing them
- */
- @Override
- public Collection<Object> validateObjects(Collection<Object> objectsToValidate) {
- return objectsToValidate;
- }
-}
+/*****************************************************************************
+ * 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.properties.creation;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage;
+import org.eclipse.papyrus.infra.properties.ui.creation.EcorePropertyEditorFactory;
+import org.eclipse.papyrus.infra.widgets.creation.IAtomicOperationExecutor;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * A Factory for creating StyleSheets directly in the resource. It is not
+ * contained in an EObject.
+ *
+ * @author Camille Letavernier
+ */
+public class StyleSheetFactory extends EcorePropertyEditorFactory {
+
+ protected View context;
+
+ public StyleSheetFactory(View context) {
+ super(NotationPackage.eINSTANCE.getEObjectListValueStyle_EObjectListValue());
+ this.type = StylesheetsPackage.eINSTANCE.getStyleSheet();
+ this.context = context;
+ }
+
+ @Override
+ protected EObject createObjectInDifferentContainer(Control widget) {
+ // The EObject is simply created ; it isn't stored anywhere (yet)
+ // @see #validateObjects(Collection)
+ return simpleCreateObject(widget);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.properties.ui.creation.PropertyEditorFactory#getOperationExecutor(java.lang.Object)
+ *
+ * @param context
+ * @return
+ */
+ @Override
+ public IAtomicOperationExecutor getOperationExecutor(Object context) {
+ if (context instanceof StyleSheet) {
+ StyleSheet stylesheet = (StyleSheet) context;
+ if (stylesheet.eResource() == null) {
+ // Bug 468345: Use the current Notation::view instead, since we're creating the stylesheet in this object's resource
+ // Ensure that further edition occurs in a proper nested transaction
+ return super.getOperationExecutor(this.context);
+ }
+ }
+
+ return super.getOperationExecutor(context);
+ }
+
+ /**
+ * Return the objects as-is. The factory is not responsible for storing them
+ */
+ @Override
+ public Collection<Object> validateObjects(Collection<Object> objectsToValidate) {
+ return objectsToValidate;
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/ThemePropertyEditorFactory.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/ThemePropertyEditorFactory.java
index e1ac9e8cbc3..35187f16e46 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/ThemePropertyEditorFactory.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/creation/ThemePropertyEditorFactory.java
@@ -15,7 +15,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.Theme;
-import org.eclipse.papyrus.views.properties.creation.EcorePropertyEditorFactory;
+import org.eclipse.papyrus.infra.properties.ui.creation.EcorePropertyEditorFactory;
import org.eclipse.swt.widgets.Control;
@@ -38,7 +38,7 @@ public class ThemePropertyEditorFactory extends EcorePropertyEditorFactory {
/**
- * @see org.eclipse.papyrus.views.properties.creation.EcorePropertyEditorFactory#simpleCreateObject(org.eclipse.swt.widgets.Control)
+ * @see org.eclipse.papyrus.infra.properties.ui.creation.EcorePropertyEditorFactory#simpleCreateObject(org.eclipse.swt.widgets.Control)
*
* @param widget
* @return
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java
index 101605646f7..dca1f8f0cd0 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/dialog/CSSThemeEditionDialog.java
@@ -46,6 +46,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsFactory;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.Theme;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.WorkspaceThemes;
+import org.eclipse.papyrus.infra.properties.ui.creation.EcorePropertyEditorFactory;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
import org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider;
@@ -57,7 +58,6 @@ import org.eclipse.papyrus.infra.widgets.providers.CollectionContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.WorkspaceContentProvider;
import org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector;
import org.eclipse.papyrus.infra.widgets.util.FileUtil;
-import org.eclipse.papyrus.views.properties.creation.EcorePropertyEditorFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElement.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElement.java
index 818b236c1db..d2920c44562 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElement.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElement.java
@@ -1,35 +1,35 @@
-/*****************************************************************************
- * 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.properties.modelelement;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.papyrus.infra.gmfdiag.css.preferences.ThemePreferences;
-import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSThemeLabelProvider;
-import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
-import org.eclipse.papyrus.views.properties.modelelement.PreferencesModelElement;
-
-
-public class CSSPreferencesModelElement extends PreferencesModelElement {
-
- public CSSPreferencesModelElement(DataContextElement context) {
- super(context);
- }
-
- @Override
- public ILabelProvider getLabelProvider(String propertyPath) {
- if (ThemePreferences.CURRENT_THEME.equals(propertyPath)) {
- return new CSSThemeLabelProvider();
- }
- return super.getLabelProvider(propertyPath);
- }
-
-}
+/*****************************************************************************
+ * 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.properties.modelelement;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.gmfdiag.css.preferences.ThemePreferences;
+import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSThemeLabelProvider;
+import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
+import org.eclipse.papyrus.infra.properties.ui.modelelement.PreferencesModelElement;
+
+
+public class CSSPreferencesModelElement extends PreferencesModelElement {
+
+ public CSSPreferencesModelElement(DataContextElement context) {
+ super(context);
+ }
+
+ @Override
+ public ILabelProvider getLabelProvider(String propertyPath) {
+ if (ThemePreferences.CURRENT_THEME.equals(propertyPath)) {
+ return new CSSThemeLabelProvider();
+ }
+ return super.getLabelProvider(propertyPath);
+ }
+
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElementFactory.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElementFactory.java
index 76bf00b0eb6..ad77722d18b 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElementFactory.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSPreferencesModelElementFactory.java
@@ -1,27 +1,27 @@
-/*****************************************************************************
- * Copyright (c) 2012, 2014 CEA LIST and others.
- *
- * 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
- * Christian W. Damus (CEA) - bug 417409
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement;
-
-import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
-import org.eclipse.papyrus.views.properties.modelelement.PreferencesModelElement;
-import org.eclipse.papyrus.views.properties.modelelement.PreferencesModelElementFactory;
-
-
-public class CSSPreferencesModelElementFactory extends PreferencesModelElementFactory {
-
- @Override
- protected PreferencesModelElement doCreateFromSource(Object sourceElement, DataContextElement context) {
- return new CSSPreferencesModelElement(context);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * 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
+ * Christian W. Damus (CEA) - bug 417409
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.modelelement;
+
+import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
+import org.eclipse.papyrus.infra.properties.ui.modelelement.PreferencesModelElement;
+import org.eclipse.papyrus.infra.properties.ui.modelelement.PreferencesModelElementFactory;
+
+
+public class CSSPreferencesModelElementFactory extends PreferencesModelElementFactory {
+
+ @Override
+ protected PreferencesModelElement doCreateFromSource(Object sourceElement, DataContextElement context) {
+ return new CSSPreferencesModelElement(context);
+ }
+}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElement.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElement.java
index 7e64efad235..b9a164efc99 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElement.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElement.java
@@ -18,7 +18,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSStyleSheetLabelProvider;
-import org.eclipse.papyrus.views.properties.modelelement.EMFModelElement;
+import org.eclipse.papyrus.infra.properties.ui.modelelement.EMFModelElement;
/**
@@ -44,7 +44,7 @@ public class CSSThemesModelElement extends EMFModelElement {
}
/**
- * @see org.eclipse.papyrus.views.properties.modelelement.EMFModelElement#getLabelProvider(java.lang.String)
+ * @see org.eclipse.papyrus.infra.properties.ui.modelelement.EMFModelElement#getLabelProvider(java.lang.String)
*
* @param propertyPath
* @return
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElementFactory.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElementFactory.java
index 71d3c44b370..4bca7fc62d6 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElementFactory.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/modelelement/CSSThemesModelElementFactory.java
@@ -17,9 +17,9 @@ package org.eclipse.papyrus.infra.gmfdiag.css.properties.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.properties.Activator;
import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
-import org.eclipse.papyrus.views.properties.Activator;
-import org.eclipse.papyrus.views.properties.modelelement.AbstractEMFModelElementFactory;
+import org.eclipse.papyrus.infra.properties.ui.modelelement.AbstractEMFModelElementFactory;
/**
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java
index 2db99a62dcc..50d8ede6916 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/preferences/ThemePreferencesPage.java
@@ -51,6 +51,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.Theme;
import org.eclipse.papyrus.infra.gmfdiag.css.theme.ThemeManager;
+import org.eclipse.papyrus.infra.properties.ui.creation.EcorePropertyEditorFactory;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
import org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider;
@@ -61,7 +62,6 @@ import org.eclipse.papyrus.infra.widgets.providers.CollectionContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.WorkspaceContentProvider;
import org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector;
import org.eclipse.papyrus.infra.widgets.util.FileUtil;
-import org.eclipse.papyrus.views.properties.creation.EcorePropertyEditorFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java
index a42b1b740f0..db4aa0f5131 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/property/StyleSheetsPropertyPage.java
@@ -46,13 +46,13 @@ import org.eclipse.papyrus.infra.gmfdiag.css.properties.provider.CSSStyleSheetLa
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.ModelStyleSheets;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsPackage;
+import org.eclipse.papyrus.infra.properties.ui.creation.EcorePropertyEditorFactory;
import org.eclipse.papyrus.infra.ui.emf.providers.EMFContentProvider;
import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
import org.eclipse.papyrus.infra.widgets.editors.MultipleValueSelectorDialog;
import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
import org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector;
-import org.eclipse.papyrus.views.properties.creation.EcorePropertyEditorFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/widgets/ResetStyleWidget.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/widgets/ResetStyleWidget.java
index f8df14a2f4a..713253ad31b 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/widgets/ResetStyleWidget.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/src/org/eclipse/papyrus/infra/gmfdiag/css/properties/widgets/ResetStyleWidget.java
@@ -1,96 +1,96 @@
-/*****************************************************************************
- * Copyright (c) 2012, 2014 CEA LIST and others.
- *
- * 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
- * Christian W. Damus (CEA) - bug 323802
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.infra.gmfdiag.css.helper.ResetStyleHelper;
-import org.eclipse.papyrus.views.properties.modelelement.DataSource;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-
-
-public class ResetStyleWidget implements SelectionListener {
-
- private Button button;
-
- private DataSource input;
-
- private String propertyPath;
-
- public ResetStyleWidget(Composite parent, int style) {
- button = new Button(parent, SWT.PUSH);
- button.addSelectionListener(this);
- button.setText("Default style");
- button.setToolTipText("Resets the properties which have been customized outside of the Style support. The default style will be applied");
- }
-
- public void widgetSelected(SelectionEvent event) {
- if (event.widget != button || input == null) {
- return;
- }
-
- IStructuredSelection viewSelection = input.getSelection();
- ResetStyleHelper.resetStyle(viewSelection);
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // Nothing
- }
-
- public void setText(String text) {
- button.setText(text);
- }
-
- public String getText() {
- return button.getText();
- }
-
- public void setToolTipText(String tooltip) {
- button.setToolTipText(tooltip);
- }
-
- public String getToolTipText() {
- return button.getToolTipText();
- }
-
- public void setInput(DataSource input) {
- this.input = input;
- checkInput();
- }
-
- public DataSource getInput() {
- return input;
- }
-
- public String getProperty() {
- return propertyPath;
- }
-
- public void setProperty(String property) {
- this.propertyPath = property;
- checkInput();
- }
-
- protected void checkInput() {
- if ((propertyPath != null) && (input != null)) {
- button.setEnabled(input.isEditable(propertyPath));
- } else {
- button.setEnabled(true); // For compatibility with XWT models that don't specify the property
- }
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST and others.
+ *
+ * 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
+ * Christian W. Damus (CEA) - bug 323802
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.css.properties.widgets;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.gmfdiag.css.helper.ResetStyleHelper;
+import org.eclipse.papyrus.infra.properties.ui.modelelement.DataSource;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+
+
+public class ResetStyleWidget implements SelectionListener {
+
+ private Button button;
+
+ private DataSource input;
+
+ private String propertyPath;
+
+ public ResetStyleWidget(Composite parent, int style) {
+ button = new Button(parent, SWT.PUSH);
+ button.addSelectionListener(this);
+ button.setText("Default style");
+ button.setToolTipText("Resets the properties which have been customized outside of the Style support. The default style will be applied");
+ }
+
+ public void widgetSelected(SelectionEvent event) {
+ if (event.widget != button || input == null) {
+ return;
+ }
+
+ IStructuredSelection viewSelection = input.getSelection();
+ ResetStyleHelper.resetStyle(viewSelection);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // Nothing
+ }
+
+ public void setText(String text) {
+ button.setText(text);
+ }
+
+ public String getText() {
+ return button.getText();
+ }
+
+ public void setToolTipText(String tooltip) {
+ button.setToolTipText(tooltip);
+ }
+
+ public String getToolTipText() {
+ return button.getToolTipText();
+ }
+
+ public void setInput(DataSource input) {
+ this.input = input;
+ checkInput();
+ }
+
+ public DataSource getInput() {
+ return input;
+ }
+
+ public String getProperty() {
+ return propertyPath;
+ }
+
+ public void setProperty(String property) {
+ this.propertyPath = property;
+ checkInput();
+ }
+
+ protected void checkInput() {
+ if ((propertyPath != null) && (input != null)) {
+ button.setEnabled(input.isEditable(propertyPath));
+ } else {
+ button.setEnabled(true); // For compatibility with XWT models that don't specify the property
+ }
+ }
+
+}

Back to the top