Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 11:52 Go to next message
Robert Doczi is currently offline Robert DocziFriend
Messages: 5
Registered: August 2016
Junior Member
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 15:26 Go to previous messageGo to next message
Pierre Guilet is currently offline Pierre GuiletFriend
Messages: 250
Registered: June 2017
Senior Member
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



Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Generic way of adding decorations to Sirius diagrams [message #1773180 is a reply to message #1773169] Fri, 22 September 2017 20:31 Go to previous messageGo to next message
Robert Doczi is currently offline Robert DocziFriend
Messages: 5
Registered: August 2016
Junior Member
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 13:24 Go to previous messageGo to next message
Pierre Guilet is currently offline Pierre GuiletFriend
Messages: 250
Registered: June 2017
Senior Member
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


Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Generic way of adding decorations to Sirius diagrams [message #1773383 is a reply to message #1773249] Wed, 27 September 2017 07:26 Go to previous message
Robert Doczi is currently offline Robert DocziFriend
Messages: 5
Registered: August 2016
Junior Member
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: Thu Mar 28 21:28:45 GMT 2024

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

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

Back to the top