Summary: | Add a new bordered node style to have rotatable images according to the parent position | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Modeling] Sirius | Reporter: | Laurent Redor <laurent.redor> | ||||||||
Component: | Diagram | Assignee: | Melanie Bats <melanie.bats> | ||||||||
Status: | NEW --- | QA Contact: | |||||||||
Severity: | enhancement | ||||||||||
Priority: | P3 | CC: | pierre-charles.david | ||||||||
Version: | unspecified | Keywords: | triaged | ||||||||
Target Milestone: | --- | ||||||||||
Hardware: | PC | ||||||||||
OS: | All | ||||||||||
See Also: | https://git.eclipse.org/r/86859 | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Laurent Redor
2016-06-02 03:31:42 EDT
An example was done, few years ago, to make this outside of Sirius (named Viewpoint before), you will find the code in attachment: * fr.obeo.dsl.viewpoint.diagram.extension.zip contains the source of a simple plug-in which extends Obeo Designer with a new extension point to configure rotatable bordered nodes. The code is under the Eclipse Public License. * test.rotatable.design.zip contains a simple example of a diagram definition which uses this extension. * test.rotatable.zip contains an example diagram using the definition in test.rotatable.design.zip. The extension works like this: 1- Create your VSM (.odesign model) as usual. Make sure to use "Custom Style" for the bordered nodes you want to make "rotatable" and give the style element a globally unique identifier (see the styles "rotatable1picture" and "rotatable4pictures" in the example VSM). 2- In the plugin.xml of the VSM project, use the extension point fr.obeo.dsl.viewpoint.diagram.extension.rotatableBorderedNode to specify the image(s) to use for the style. If you specify a single image for the "top" position, it will be automatically rotated of the appropriate angle depending on which side of its container the bordered node is placed. You can also specify a different image for each of the 4 sides (top, bottom, left, right). The test.rotatable.design project contains examples of both usages. Created attachment 262181 [details]
fr.obeo.dsl.viewpoint.diagram.extension.zip
Created attachment 262182 [details]
test.rotatable.design.zip
Created attachment 262183 [details]
test.rotatable.zip
New Gerrit change created: https://git.eclipse.org/r/86859 Moving to 5.1. |