Show Nodes selectively from another Model [message #1744372] |
Mon, 26 September 2016 11:45 |
Bo Liu Messages: 32 Registered: July 2016 |
Member |
|
|
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 11:47] Report message to a moderator
|
|
|
Re: Show Nodes selectively from another Model [message #1744379 is a reply to message #1744372] |
Mon, 26 September 2016 12:16 |
|
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
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.06286 seconds