Skip to main content



      Home
Home » Eclipse Projects » Sirius » Creating diagrams automatically
Creating diagrams automatically [message #1822288] Tue, 03 March 2020 04:11 Go to next message
Eclipse UserFriend
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 05:05 Go to previous messageGo to next message
Eclipse UserFriend
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 05:12] by Moderator

Re: Creating diagrams automatically [message #1822294 is a reply to message #1822289] Tue, 03 March 2020 06:27 Go to previous messageGo to next message
Eclipse UserFriend
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 09:01 Go to previous messageGo to next message
Eclipse UserFriend
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 10:25 Go to previous message
Eclipse UserFriend
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: Sun Jun 15 21:14:18 EDT 2025

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

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

Back to the top