Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » TreeViewer - setSelection
TreeViewer - setSelection [message #266973] Sat, 14 August 2004 16:26
Jochen Kressin is currently offline Jochen KressinFriend
Messages: 9
Registered: July 2009
Junior Member
Hi,

Using Eclipse 3.0, i have two questions on TreeViewer´s setSelection
method. Background: I create a TreeViewer where some particular,
identical items (objects) are inserted multiple times at different
positions in the tree hierarchy. The objects are equal in terms of the
equals() - method.

1) When I call setSelection with an object which was inserted in the
tree multiple times, the TreeViewer chooses one of them arbitrarily. Is
there any way to influence this behaviour, e.g. tell the TreeViewer that
it should start the search for the object starting from a particular
node in the tree?

2) When the TreeViewer was initialized, i.e. the setInput() method was
called, but the user did not click any node, the setSelection() - method
does not work. No item is selected whatsoever. If the user expands one
node in the tree before setSelection() is called, it works. Is this
behaviour known? Right now I use a workaround: Before the tree is
visible, I programmatically expand and the collapse all the nodes.

Thanks in advance for your answers.

Jochen
Previous Topic:Class not found
Next Topic:Questions on Upgrade installation
Goto Forum:
  


Current Time: Sun Oct 06 00:21:43 GMT 2024

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

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

Back to the top