Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Show Nodes selectively from another Model
Show Nodes selectively from another Model [message #1744372] Mon, 26 September 2016 11:45 Go to next message
Bo Liu is currently offline Bo LiuFriend
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 Go to previous message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
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
Previous Topic:Ecore automatically imported and displayed
Next Topic:Sirius Resource Strategy and Resource.unload()
Goto Forum:
  


Current Time: Thu Sep 19 17:22:44 GMT 2024

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

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

Back to the top