Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2014-03-10 13:31:20 +0000
committerCamille Letavernier2014-04-29 17:01:34 +0000
commit5717e7c4cd40cb251ea5947c66766460f96bac02 (patch)
tree97fd1dbc9a951d1709043e0447e0ad5088784113 /plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model
parente98e5b70ef456d2058777763567b6495ef87a827 (diff)
downloadorg.eclipse.papyrus-5717e7c4cd40cb251ea5947c66766460f96bac02.tar.gz
org.eclipse.papyrus-5717e7c4cd40cb251ea5947c66766460f96bac02.tar.xz
org.eclipse.papyrus-5717e7c4cd40cb251ea5947c66766460f96bac02.zip
429642: [Model / CSS] Add properties view to define Model's stylesheets
https://bugs.eclipse.org/bugs/show_bug.cgi?id=429642 -Adding Forgotten dependency in a manifest Previous changes: -Change CSSStyleSheetProvider to return styleSheet contained on modelStyleSheet -if doesn't exists, add modelStyleSheet on a transaction without command Previous changes: -Add transactionnal command to add modelStyleSheet if dosent exists -Change resourceListener to adapter attached to modelStyleSheet and StyleSheet Previous changes: -Replace Ressource by Resource -Remove Notation import package on manifest -Use DestroyElementRequest + ServiceEdit on remove commands -Delete ModelStyleSheetContentProvider -> We don't use it but the CSSStyleSheetContentProvider instead which does the same things. -Add condition on modelCSSEngine's listener -Some JAutodoc formating -Fix "When we add the first model stylesheet on a Model, the ModelStyleSheets widget doesn't display it" The first commit's message is: -Add a ModelStyleSheet Observer List for the style properties view -Modify ModelCSSEngine to refresh model at ressource changes Change-Id: Ibb247e102c8360933036c5f1eea8382858eb021d Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
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/properties/css.ctx3
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties/model/properties/ui/SingleDiagram.xwt21
2 files changed, 17 insertions, 7 deletions
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 b172a3d7644..6b4fb350795 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
@@ -61,6 +61,9 @@
<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">
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 5d97981f0a2..4361f29795b 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,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Composite
+<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:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"
+ 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>
@@ -18,15 +18,22 @@
<Composite.layout>
<GridLayout></GridLayout>
</Composite.layout>
- <css:ResetStyleWidget input="{Binding}" property="CSS:PapyrusCSSStyle:cssStyle"></css:ResetStyleWidget>
+ <css:ResetStyleWidget property="CSS:PapyrusCSSStyle:cssStyle"
+ input="{Binding}"></css:ResetStyleWidget>
</Composite>
<Composite>
<Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
</Composite.layout>
<ppe:MultiReference input="{Binding}"
property="CSS:DiagramStyle:css_stylesheets"></ppe:MultiReference>
- <ppe:MultiString property="CSS:PapyrusCSSStyle:cssClass"
- input="{Binding}"></ppe:MultiString>
+ <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

Back to the top