Community
Participate
Working Groups
Papyrus should provide a CSS Engine for GMF elements. The CSS selectors should be based on the semantic model (e.g. UML), while the CSS properties should reflect the GMF Style properties, as well as some custom properties (e.g. UML Style properties defined in Papyrus). The CSS stylesheets should be defined at three levels: - Workspace - Model - Diagram The CSS files should be editable either textually or graphically. The graphical editor should look like the current preferences page in Papyrus.
r7275~7277: First draft of the CSS Support: - GMF Notation Model is overridden with the CSS Implementation. This is potentially intrusive, although efforts have been made to avoid behavior changes outside of Papyrus. - CSS Engine support in Papyrus - Base theme added for UML It is currently not possible to choose which CSS files are applied, nor to edit the existing ones.
r7301, r7311: The following CSS Engines are supported: - Base: OK - Workspace: Runtime only (Not configurable ; A Sample CSS file is automatically applied). - Model: Runtime only (Not configurable ; currently unusable) - Diagram: OK (Runtime + Property view) - Local: OK (Runtime + Property view) It is possible to apply CSS Classes, Style and ID on elements. Diagram and Model stylesheets can be either referenced (ie. external CSS files) or embedded (ie. stored in the *.notation model). The tool supports all the GMF Style properties, plus a few Papyrus ones: - elementIcon - qualifiedNameDepth - shadow The CSS StyleSheet information is stored in the Notation model (EMF Objects + Custom GMF NamedStyles)
r7326: The EMF model for CSS Stylesheets has been isolated in its own plug-in, so that it can be shipped along with Papyrus. This will avoid inconsistent models, even when the CSS plug-ins are not installed. Implemented full support for Workspaces Themes. Improved listeners and automatic refresh after modifications.
r7333 ~ r7337: Added Facets & Customizations in the ModelExplorer to display the StyleSheets
r7355: Minor fixes
r7438~7441: - Added an X-Text editor for CSS Stylesheets. The editor essentially works as a parser/serializer for manipulating CSS Files as EMF Models. Currently, the editor provides less support for editing CSS files in text mode than the standard CSS editor. - Added an option to save the style of the selected View in a Stylesheet. This allows for editing a CSS stylesheet with a graphical tool - Added suggestions for adding a CSS Class to an element. The suggestion lists all the CSS Classes which can be applied to the kind of element which is selected (Based on its element type, ie. the name of its metaclass). It is still possible to add a custom CSS Class (Which doesn't have to exist yet). - The Appearance property view configuration has been split in two: the Style part of the Notation Metamodel (All Metaclasses extending Style), and the rest. An extension point has been added to override the behavior of the Style property view. This allows to keep the same property view for editing different kinds of objects (For example, the same Appearance property view can now be used to edit either the .notation model or a Stylesheet's Ruleset). Currently, Papyrus only provides one implementation of the Style handler, which edits the Notation model. - A few widgets (from infra.widgets) have been improved to be used programmatically (Outside of the Property View).
r7698, r7699: Added more meaningful error messages to the "Create new style" dialog. The OK button is now disabled until the errors are fixed. Stylesheet widgets are now cleaned when another widget is used to select a stylesheet, to avoid confusion about what widget will actually be used.
r7707: Added support for Style edition dialog
The task is complete
r7976: Added an extension point to disable the PreferencesInitializer when CSS support is enabled. This is necessary to avoid conflicts between the preferences-based theme and the CSS-based one. The extension point is internal.
r7978: The previous commit wasn't complete
r8391, r8392: Custom style properties have been included to the "Export style" tool (elementIcon, shadow and qualifiedNameDepth)