Post subject: highlight the node in a treeviewer Posted: Jul 21, 2005 - 05:39 PM
Guest
Hi everyone,
Here is an interesting problem.
I have a treeviewer, and when I double click or left click the node in the tree, the node can be highlighted. But when I right click the node, it pop up a menu, and the node can't be highlighted after I choose one of the menuitems.
I try to use the code below:
ISelection selection = viewer.getSelection();
Object obj = ((IStructuredSelection) selection) .getFirstElement();
to check when the node is still be selected. It's true!!! But how can I still keep the node highlighted?