Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Select widget in edge creation
Select widget in edge creation [message #1798491] Mon, 19 November 2018 19:04 Go to next message
Michael Bräunlein is currently offline Michael BräunleinFriend
Messages: 1
Registered: November 2018
Junior Member

In my metamodel I have a class called Member that has a Bi-direktional reference to a class called Message:


I want to be able to connect two Nodes of type Member. During the edge creation I would like the user to select a message and set the selected message as sentMsg of the source Node.

What I have achieved so far is that on edge creation a dialog is opened and offers a dropdown selection. I have not figured out how to continue as the dropdown is empty.


1) What are the required fields so I can select any message present in the model?
2) What would I have to do to limit the displayed results to only messages that are not sent by a Member?

Thank you very much in advance
  • Attachment: metamodel.png
    (Size: 6.00KB, Downloaded 327 times)
  • Attachment: editor.png
    (Size: 43.22KB, Downloaded 292 times)
Re: Select widget in edge creation [message #1798636 is a reply to message #1798491] Wed, 21 November 2018 13:33 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 554
Registered: July 2009
Senior Member

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?
Previous Topic:Display of attributes of elements to the diagramm.
Next Topic:left menu
Goto Forum:

Current Time: Mon Jan 25 08:44:02 GMT 2021

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

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

Back to the top