Show Nodes selectively from another Model [message #1744372] |
Mon, 26 September 2016 07:45  |
Eclipse User |
|
|
|
Hello,
E.g. I have two Models, A and B.
In Models B there is a Node called Resource.
In an Instance of Model B, there are 3 Resources called Laptop, PC and iPad.
What I want to do is, to have a Dialog in the graphical Editor of Model A.
In the Dialog I can select the Resources in Model B and show theses Resource Nodes in the graphical Editor of Model A.
For Example, I choose Laptop and iPad in the Dialog and then these two Nodes will appear in the graphical Editor of Model A.
Is that possible?
[Updated on: Mon, 26 September 2016 07:47] by Moderator
|
|
|
Re: Show Nodes selectively from another Model [message #1744379 is a reply to message #1744372] |
Mon, 26 September 2016 08:16  |
Eclipse User |
|
|
|
Hello,
If both model are opened in the same modeling project (same Editing domain actually), you can navigate from one model to another using the Sirius session (see org.eclipse.sirius.business.api.session.Session.getSemanticResources()) to display the element of Model B in the dialog. To display the selected nodes on the diagram, you have two options:
- selecting nodes in the dialog results in adding a semantic reference from model A to model B elements.
- the diagram is desynchronized with a mapping having a semantic candidate expression looking for any Resource semantic element (actually having no expression should produce the same result here). Then, selecting nodes in the dialog results in creating DViews of model B elements on the diagram to display these elements.
Regards,
Steve
|
|
|
Powered by
FUDForum. Page generated in 0.02639 seconds