Change context to the root of the diagram in edge creation tool [message #1806212] |
Mon, 06 May 2019 09:25 |
Adriano Carvalho Messages: 54 Registered: November 2018 |
Member |
|
|
Hi,
I have a model that looks like the following:
root
» typeA instanceA;
» typeA instanceA2;
» typeB instanceB;
» ...
» typeN instanceN;
» connections
»» instanceA connects to isntanceB
»» instance B connects to instanceN
»» ...
I have a "node" diagram element as well as a "element based edge" diagram element to show the instances and the connections between them. This works fine.
I want to have a "edge creation" tool and so I thought that I would "only" need to add the following under "Begin":
» Change context to "root.connections"
(instead of the above I thought it would also be possible to » Change context to "source.eContainer().connections".)
» Create instance "connection"
» Set attributes.
Nevertheless, I am having trouble right from the start (with change context).
1. I don't know how nor was able to find out how to navigate to the root of the diagram even though it seems like a plausible intent. Is this possible? How?
2. If I "navigate" the "source" I jump around some internal elements and not the actual model. Can I use "source" (or "target" BTW) to navigate the actual model? How?
Thanks is advance.
Best regards.
Adriano Carvalho
[Updated on: Mon, 06 May 2019 09:27] Report message to a moderator
|
|
|
|
Re: Change context to the root of the diagram in edge creation tool [message #1806451 is a reply to message #1806212] |
Thu, 09 May 2019 09:27 |
|
Adriano Carvalho wrote on Mon, 06 May 2019 11:25
1. I don't know how nor was able to find out how to navigate to the root of the diagram even though it seems like a plausible intent. Is this possible? How?
You should probably have access to a variable named "diagram", which points to Sirius's DDiagram model element that represents the whole diagram. From there, the "target" reference will point to the semantic element (from your model) on which the diagram is created. In other words, "aql:diagram.target" should return your "root" model element.
Quote:
2. If I "navigate" the "source" I jump around some internal elements and not the actual model. Can I use "source" (or "target" BTW) to navigate the actual model? How?
As for DDiagram, the other internal Sirius model elements (DNode, DEdge, etc.) have a "target" reference that points to the semantic model element (in *your* model) they represent.
Regards,
Pierre-Charles
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.04103 seconds