Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to config Select Wizard for show a tree?(Select Wizard)
How to config Select Wizard for show a tree? [message #1771788] Wed, 30 August 2017 13:35 Go to next message
Bo Zhang is currently offline Bo ZhangFriend
Messages: 28
Registered: July 2017
Junior Member
I have a meta-model like

Word includes Familys: families[0~*]
Family includes Person: persons[0~*]

I need create a Select Wizard, when I click a family instance, It will show other all families and persons.


This page ( ) only said :
The Candidates Expression should return a list of elements from which the user can select the variable's value. By default these candidates are presented as a list. You can also enable the Tree mode, and specify a Children Expression, which will be evaluated recursively on each candidate to build a tree of possible values. Finally, you can set the Multiple flag to allow users to select several of the candidates instead of a single one.

It does not mentioned Root Expression, so I don't know how to config it. I tried many times, but it can't work like I hope.

I config the Select Wizard as:
Candidates Expression: self.eContainer().families.members
Tree: true
Root Expression: self.eContainer().families
Children Expression: self.eContainer().families.members

Please help me how to config the Expression could get my desired.
Thank you.

Re: How to config Select Wizard for show a tree? [message #1771876 is a reply to message #1771788] Thu, 31 August 2017 15:03 Go to previous message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 177
Registered: October 2014
Senior Member
Effectively, the usage of the feature is not intuitive.
Root Expression and Children Expression elements must be in the Candidates expression list

In your case,
Candidates Expression: self.eContainer().eAllContents() (or a more subtile expression that includes families and members only)
Root Expression: self.eContainer().families
Children Expression: self.eContents(YourMetamodel::Member)

I've created a bugzilla to update the documentation:


Laurent Fasani - Obeo
Need training or professional services for Sirius?
Previous Topic:Generate odesign programmatically
Next Topic:Hide node or container by default
Goto Forum:

Current Time: Thu Mar 04 16:08:30 GMT 2021

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

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

Back to the top