edge creation automatically [message #1810612] |
Wed, 14 August 2019 10:38 |
maryam mehrabi Messages: 25 Registered: May 2019 |
Junior Member |
|
|
hello all.
I am new sirius user and I have 2 questions. I will appreciate if you help me.
I have a meta-model that I attached that. I wanna to make a graphical editor for it. I have created nodes pallette but for creating relations I have some problems.
q1: according to my meta model, is there any way when the end user create nodes from A, B, C, D, E and F using pallete, the d, e and f relations
creates automatically without edge creation tools? if yes how can I do that?
q2: how can I create one edge creation tool for ed and fe relations? I see this topic(Edge creation for several relations) in the forum but I couldnt write a suitable aql in node creation tool to do that. can you explain the solution in detail or give me an example with same solution?!
[Updated on: Thu, 15 August 2019 10:32] Report message to a moderator
|
|
|
|
Re: edge creation automatically [message #1811007 is a reply to message #1810704] |
Fri, 23 August 2019 13:51 |
|
Hello,
q1: In your node creation tool, you are free to set features or attributes to the new created element by defining a "Set" operation. This operation will set the reference "fe" for instance if an other E object exist when creating an object F. But if you have several instance of E when creating a new F, the end user will have to choose which one the relation fe needs to reference.
q2: You can use the If operation that will, according to the instance type of the source and/or target, will set the appropriate relation.
You can find a good example of odesign in the EcoreTools project: https://github.com/eclipse/ecoretools/tree/master/org.eclipse.emf.ecoretools.design/description
Here the model operation documentation: https://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html
Regards,
Florian
|
|
|
|
Powered by
FUDForum. Page generated in 0.03701 seconds