Skip to main content



      Home
Home » Eclipse Projects » Sirius » Generic way of adding decorations to Sirius diagrams
Generic way of adding decorations to Sirius diagrams [message #1773159] Fri, 22 September 2017 07:52 Go to next message
Eclipse UserFriend
Hi,

Is there any way to add diagram decorations to any Sirius editor programmatically in a generic manner? I created an eclipse plugin that provides decorations through the org.eclipse.ui.decorators extension point for the Model Explorer view and I would like to do something similar in case of Sirius editors.

Thanks,
Robert
Re: Generic way of adding decorations to Sirius diagrams [message #1773169 is a reply to message #1773159] Fri, 22 September 2017 11:26 Go to previous messageGo to next message
Eclipse UserFriend
Hi Robert,

You have a decorator mechanism available in your VSM.

Its documentation is available to the following link: https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#decorations

I hope this answers your question.

Regards,

Pierre

Re: Generic way of adding decorations to Sirius diagrams [message #1773180 is a reply to message #1773169] Fri, 22 September 2017 16:31 Go to previous messageGo to next message
Eclipse UserFriend
Hi Pierre,

I know about that mechanism, but I am not sure it helps, as my problem is with the diagram extension mechanism rather than the decorator mechanism.
I probably did not explain my issue in enough detail, so let me elaborate. I am currently working on a project that uses an EMF model (change model) to describe changes in another arbitrary EMF model (target model). I would like to be able to add a decorator to the Sirius editor of the target model to mark changed elements. In my main use case, the set of viewpoints defined for the target model is known, but there are several dozen of them. Is there any way to provide a diagram extension to all of them and avoid specifying it for each individual viewpoint, essentially duplicating it? An even better solution would be if I could specify my extension to work with any viewpoint, as this would allow the tool to work with arbitrary Sirius editor. Is that possible?

Thanks,
Robert
Re: Generic way of adding decorations to Sirius diagrams [message #1773249 is a reply to message #1773180] Mon, 25 September 2017 09:24 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Decorations like custom style are transient so you can use regular expression mechanism to define the viewpoint and diagram for which the diagram extension (only containing decorations) applies.

So basically you define your decorations in a diagram extension and use as viewpointURI viewpoint:/my.eclipse.project/.* and as Representation Name .*

And this should work.

Regards,

Pierre
Re: Generic way of adding decorations to Sirius diagrams [message #1773383 is a reply to message #1773249] Wed, 27 September 2017 03:26 Go to previous message
Eclipse UserFriend
Hi,

That sounds like it should work. Thanks for the help!

Regards,
Robert
Previous Topic:Removing the Sirius Modeling Perspective
Next Topic:Precondition Expression and Edge creation
Goto Forum:
  


Current Time: Wed Jul 23 11:12:32 EDT 2025

Powered by FUDForum. Page generated in 0.05190 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top