Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » generate the sub tree from tree
generate the sub tree from tree [message #636828] Tue, 02 November 2010 22:02 Go to next message
Eclipse UserFriend
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: Tue, 02 November 2010 22:02] by Moderator

Re: generate the sub tree from tree [message #636857 is a reply to message #636828] Wed, 03 November 2010 03:20 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 13:50:20 EDT 2025

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

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

Back to the top