Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » generate the sub tree from tree
generate the sub tree from tree [message #636828] Wed, 03 November 2010 02:02 Go to next message
ash is currently offline ashFriend
Messages: 142
Registered: July 2010
Senior Member
Hi all.

I dont know weather it is possible are not ? but still i want to know answer..


I checkbox tree viewer.. now i will select few node from from check box tree viewer... now i want to generate the tree
same hiearchy with only selected nodes.

Thanks
ashok

[Updated on: Wed, 03 November 2010 02:02]

Report message to a moderator

Re: generate the sub tree from tree [message #636857 is a reply to message #636828] Wed, 03 November 2010 07:20 Go to previous message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
On 03.11.2010 03:02, ashok_kumar_rr@yahoo.com wrote:
> Hi all.
> I dont know weather it is possible are not ? but still i know answer..
>
>
> I checkbox tree viewer.. now i will select few node from from check box
> tree viewer... now i want to generate the tree same hiearchy with only
> selected nodes.

Untested: You might try to add a temporary ViewerFilter that is
activated, when you need that (you don't describe this situation very
clearly). The filter would only accept those elements, which are
selected. You can use the IStructuredSelection result of the viewer for
matching them.

If you don't want to filter the original tree, but want to have an
independent viewer, you can do the same thing, but provide a seperate
Viewer with the same input, but with the filter that I described above.
The referenced IStructuredSelection object is that of the first tree,
of-course.

If you need a complete independent copy of the tree *model*, you can
also follow this route, but slightly different: Use a standard algorithm
to copy a tree, but while doing so, check for each added element whether
it is member of the IStructuredSelection object of the reference tree.
If not, don't copy this particular element.

HTH & Greetings from Bremen,

Daniel Krügler
Previous Topic:Changing fonts without effect
Next Topic:Exporting a features dependencies?
Goto Forum:
  


Current Time: Fri Dec 19 08:16:13 GMT 2014

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

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