Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » LazyTree and node selection
LazyTree and node selection [message #299911] Mon, 27 February 2006 22:01 Go to next message
Eclipse UserFriend
Originally posted by: public.bojerco.REMOVE.com

This might be obvious to someone, but how do I programaticaly set node
selection in a tree.

A bit of background, our tree uses LazyTreeContent provider and tree
items are not of a type TreeItem. I've tried with
Viewer.setSelection(new StructuredSelection(node), true), but it does
nothing. Also, we are using 3.2M5a.
Re: LazyTree and node selection [message #300050 is a reply to message #299911] Wed, 01 March 2006 04:20 Go to previous message
Eclipse UserFriend
entry is my user object in the tree and I use this code when I add the
entry to a tree to make it visible and selected.

treeViewer.refresh(entry.getParent());
treeViewer.expandToLevel(entry,1);
treeViewer.reveal(entry);
IStructuredSelection sel = new StructuredSelection(entry);
treeViewer.setSelection(sel, true);
Previous Topic:Incremental Build Sensitiy
Next Topic:How do I determine the contributing bundle for a given extension
Goto Forum:
  


Current Time: Sun Apr 27 10:02:54 EDT 2025

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

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

Back to the top