This service is archived, please use www.eclipse.org/forums


Home » Capella » Capella Studio » Automatic diagrams creation and objects deployment
Automatic diagrams creation and objects deployment [message #2934] Thu, 07 March 2019 06:05 Go to next message
gregoire.cassin.gmail.com is currently offline  gregoire.cassin.gmail.com
Messages: 5
Registered: May 2017
Junior Member
Hi,

I would like to create automatically diagrams and deploy elements in those diagrams at the same time using a java plugin.

The elements to be deployed (with no layout) in the diagrams would be previously imported in the model, so no need to create elements at this stage.

This automatization is needed as a large number of diagrams has to be created.


How can this be done?

Thanks in advance,

Gregoire
Re: Automatic diagrams creation and objects deployment [message #2943 is a reply to message #2934] Mon, 11 March 2019 03:52 Go to previous messageGo to next message
samuel.rochet.obeo.fr is currently offline  samuel.rochet.obeo.fr
Messages: 48
Registered: March 2015
Member
Hi Gregoire,

Are these diagram options relevants in your case?
- Synchronized: if a new semantic element compatible with the mapping is created (even by an action on another representation or a change in the semantic model's file), the corresponding graphical element will automatically appear on the diagram. Symmetrically, if the semantic element of one of the mapping's instances is deleted from the model, the graphical element (view) will disappear automatically
- Initialization: If Initialization is set, then when the viewpoint which contains this diagram description is enabled, instances of this diagram description will be automatically created on all compatible semantic elements. (/!\ high impact on performance)

See Sirius documentation for details: https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagra ms.html


Samuel
Re: Automatic diagrams creation and objects deployment [message #2950 is a reply to message #2943] Tue, 12 March 2019 04:12 Go to previous messageGo to next message
gregoire.cassin.gmail.com is currently offline  gregoire.cassin.gmail.com
Messages: 5
Registered: May 2017
Junior Member
Hi Samuel,

Thank you for your answer.

I should have been more precise in my question, I do not want to create a new kind of Sirius Diagram.
My goal is actually to create / instantiate automatically [PAB] diagrams in a Capella Model already filled with elements.

If I understand well, I need to create a new Representation using an existing Description ( = Physical Architecture Blank )
Should I use the following sirius API --> org.eclipse.sirius.business.api ?

In my case, can I use the Initialization option you mentioned ?


Gregoire

[Updated on: Tue, 12 March 2019 04:13]

Report message to a moderator

Re: Automatic diagrams creation and objects deployment [message #2952 is a reply to message #2950] Tue, 12 March 2019 04:57 Go to previous message
samuel.rochet.obeo.fr is currently offline  samuel.rochet.obeo.fr
Messages: 48
Registered: March 2015
Member
Hi Gregoire,

The initialization option may not be most appropriate in your case.

I would just create an user action triggering those steps:
for each 'Element'
1) create a PAB
2) set contextual elements
3) (option) set diagram name
4) (option) refresh diagram


For instance, applied to functional chains, this should automatically create this kind of diagram.

Samuel
  • Attachment: Capture1.PNG
    (Size: 388.39KB, Downloaded 110 times)
Previous Topic: Generate EMF from Capella Model
Next Topic: Is there a way to automate operations in Capella by using scripts?
Goto Forum:
  


Current Time: Sat Mar 28 04:23:18 EST 2020

Total time taken to generate the page: 0.01735 seconds