Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Creating diagrams automatically
Creating diagrams automatically [message #1822288] Tue, 03 March 2020 09:11 Go to next message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 135
Registered: October 2019
Senior Member
Hi,

Is there a way to create diagrams automatically for newly generated models?

In some of my modeling solutions, the users are expected to create a domain-specific model and then always create an initial diagram to start composing the model.

Currently, they first need to create the model (New->Other->model X), then apply the relevant Sirius viewpoint to the model and then add a diagram. Can the last two steps be automated so that they are performed automatically once a user selects the model to be created?

Thanks,
Avi
Re: Creating diagrams automatically [message #1822289 is a reply to message #1822288] Tue, 03 March 2020 10:05 Go to previous messageGo to next message
Emmanuel Chebbi is currently offline Emmanuel ChebbiFriend
Messages: 123
Registered: February 2018
Senior Member
It is possible to programmatically create a new Ecore model and a corresponding Sirius representation. There already are several topics on the subject in this forum; I can advise you to look at those two:

EDIT: it is also possible to ask Sirius to automatically create a new representation when a model is added to the session (see the docs [1]):

  1. Open you project.odesign file
  2. Select the node corresponding to your diagram representation
  3. In the Properties view check Initialization

[1] https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#diagram_description

[Updated on: Tue, 03 March 2020 10:12]

Report message to a moderator

Re: Creating diagrams automatically [message #1822294 is a reply to message #1822289] Tue, 03 March 2020 11:27 Go to previous messageGo to next message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 135
Registered: October 2019
Senior Member
Thanks.

I did try the "initialization" in the Properties view, as well as the "show on startup" option, before asking the original question, but they did not work. Is it working in general? (perhaps I did something wrong. If you can confirm these indeed work then I will try again)

Regards!
Re: Creating diagrams automatically [message #1822301 is a reply to message #1822294] Tue, 03 March 2020 14:01 Go to previous messageGo to next message
Emmanuel Chebbi is currently offline Emmanuel ChebbiFriend
Messages: 123
Registered: February 2018
Senior Member
I can only confirm that these options were working on Sirius 6.1.1.201810260931, which was released more than 1 year ago. I think that they still work though.
Re: Creating diagrams automatically [message #1822532 is a reply to message #1822301] Mon, 09 March 2020 14:25 Go to previous message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 135
Registered: October 2019
Senior Member
Thank you. I tried the "initialization" option again and this time it worked. Have no idea why it did not work in the past.

Regards,
Avi
Previous Topic:Exporting a diagram/node from odesign Sirius file
Next Topic:[ANN] Sirius 6.1.4
Goto Forum:
  


Current Time: Sat Sep 21 22:51:27 GMT 2024

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

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

Back to the top