as the title already says… I’d like to open a ElementTreeSelectionDialog with the Tree already unfolded. Is there any way?
Regards,
Michael
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The ElementTreeSelectionDialog doesn’t have this capability out of the box, but you can easily extend it to add this behavior. Simply subclass it and override the createTreeViewer method. After calling super version of this method, you will have a handle on initialized TreeViewer for the dialog. At that point, it is simply a matter of using TreeViewer.setExpanded() or TreeItem.setExpanded() API to expand as little or as much as you’d like.