Community
Participate
Working Groups
We can have a style on bordered nodes where we can specify : * one image, it takes this image for north side and rotate it (90° for east side, 180° for south side, 270° for west side) * or several images, for example with 4 images, it displays one image on a specific side (one on the north, one on the east, one on the south and the last on the west)
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.