|select collapsed item in TreeView [message #831715]
||Thu, 29 March 2012 04:42
| Lars Schütze
Registered: March 2012
I want to select and expand a special path from a collapsed item in a SWT TreeView. If the tree is expanded thus far that the items are visible the code below works. Otherwise not.
TreeViewer mbViewer = (TreeViewer) mbSelectionProvider;
mbViewer.setSelection(new StructuredSelection(linkTarget), true);
Does anyone have the trick to get this work?
I have to state that linkTarget is from Type EObject and is a different class as the TreeItem. Since I tried to calculate the TreePath myself I did'nt get this work as I did not know how I could compare the TreeItem's to the linkTarget's type.
Thanks in advance
Powered by FUDForum
. Page generated in 0.01650 seconds