|Re: Select widget in edge creation [message #1798636 is a reply to message #1798491]
||Wed, 21 November 2018 13:33
|| Pierre-Charles David
Registered: July 2009
When the "Begin" block of your Edge Creation Tool is executed, the semantic connection between the two Member instances the user selected is not yet made. Sirius is completely flexible in what it means in term of domain model change to "connect two Nodes of type Member", but the counterpart is that it can not do that connection for you: you have to configure your tool explicitly to make the change. From the screenshot, your tool starts by opening the "Select Message" wizard, but at the point this will get executed your domain model has not yet changed.
I suggest you separate the definition of your tool in separate steps:
1. First make a simple Edge Creation tool which does not try to also configure the Message directly.
2. Then create a separate tool (for example a Double Click tool), which you can invoke on the already created edge, and in that second tool open a dialog to select the message and configure it as sentMsg of the source node. Note that for simple cases of just opening a dialog to allow the user to select a model element, using "Open Dialog" operation is overkill and adds a lot of complexity. The Selection Wizard is much simpler to use and probably enough here.
3. Once you have both parts working, you can move the behavior you will have defined in the Double Click tool "inline" inside the Edge Creation tool, but after it has properly configured the domain model (i.e. created the actual connection between the Members).
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
Powered by FUDForum
. Page generated in 0.01937 seconds