I have a JFACE
Treeviewer (with underlying SWT
Tree contain multiple lines and multiple levels.
I want to be able to find specific tree node (compare by text label), epand to it's level and select the item.
The main problem that i can't loop over
TreeItems becasue tree loads everything in LAZY mode.
Maybe there is an option to get to tree item by searching the model?
Best How To :
If you want to expand the tree to a node that may not have been shown yet you can use
TreePath to tell the viewer about the full path to the node. Something like:
List<Object> path = new ArrayList<>();
... path.add(intermediate elements in tree);
TreePath treePath = new TreePath(path.toArray());
The 'elements' you add to the path are your model objects as returned by the content provider.