|Set reference to existing class instance with tool [message #1843206]
||Tue, 20 July 2021 08:17
| Aron S
Registered: June 2021
simplified i have the meta model below:
I already have a tool to create instances of Class_B.
Now I want to create a second tool which creates an instance of Class_A, an instance of Child_A, let the user choose a corresponding class_b from allB and sets the reference.
How can i achieve this?
I tried two approaches using the Open Dialog:
1. The Reference widget (https://www.eclipse.org/sirius/doc/specifier/properties/Properties_View_Description.html#reference) seems to do exactly what i want, but i couldn't get it to work. It does not appear in the dialog at all.
2. I used the Radio widget. With aql:container.allB as Candidate Expression the dialog shows all available instances of Class_B, but it doesn't create the Child_A instance (and the reference of course neither).
The corresponding .odesign configuration:
And i attached the example project.
(Size: 169.57KB, Downloaded 30 times)
(Size: 15.44KB, Downloaded 175 times)
(Size: 17.40KB, Downloaded 181 times)
Powered by FUDForum
. Page generated in 0.02182 seconds