Dramas with TreeViewer and setSelection() [message #455907] |
Mon, 23 May 2005 05:45 |
Robby Messages: 2 Registered: July 2009 |
Junior Member |
|
|
I'm creating an eclipse form within one of my editors and I must not
directly understand how to approach this, or I'm ignorant on how to go
about it.
When in the edit mode I've created a POJO to send to the editor through
the editorinput. Then I'm pulling out a category value that is within
that POJO and I'm trying to programmatically select the TreeItem from
within the tree.
http://www.eclipse.org/articles/treeviewer-cg/TreeViewerArti cle.htm says
to setSelection(new StructuredSelection(<domain model>), true).
The tree's input is a jdom.Element (and its children), given that
information - Do I create an element with the exact same
childnodes/attributes and pass it to that method? I guess I'm not clear
on what determines a match when passing it via setSelection() and
curious if there is a way to override the way it compares.
I've also tried looping through each TreeItem and compare it's text and
can't get that to fly either.
So long story short, How can I programmatically select a TreeItem within
a Tree?
Cheers,
Robby
|
|
|
Powered by
FUDForum. Page generated in 0.03081 seconds