string filter for TreeViewer [message #541445] |
Mon, 21 June 2010 08:41 |
coly Messages: 2 Registered: July 2009 |
Junior Member |
|
|
Hi,
I use treeviewer to manager a series of filenames and directories,
the tree may be as follows:
root
xyz.dir
abc.file
axy.file
bb.file
xzf.dir
bc.file
yz.file
now, I have a string from a Text, and I want to filter the treeviewer nodes according to this string. For example,
if the string is "x", then the treeviewer should be as follows:
root
xyz.dir
axy.file
xzf.dir
if the string is "xy", then
root
xyz.dir
axy.file
this is the function that I want to realize, and I try to use ViewFilter, but I failed.
Can anyone provide some suggestions?
coly.
|
|
|
Re: string filter for TreeViewer [message #541549 is a reply to message #541445] |
Mon, 21 June 2010 13:13 |
Eclipse User |
|
|
|
Originally posted by: gemaspecial.yahoo.com.hk
Try FilteredTreeViewer
On 6/21/2010 4:41 PM, coly wrote:
> Hi, I use treeviewer to manager a series of filenames and directories,
>
> the tree may be as follows:
>
> root
> xyz.dir
> abc.file
> axy.file
> bb.file
> xzf.dir
> bc.file
> yz.file
>
> now, I have a string from a Text, and I want to filter the treeviewer
> nodes according to this string. For example,
>
> if the string is "x", then the treeviewer should be as follows:
> root
> xyz.dir
> axy.file
> xzf.dir
>
> if the string is "xy", then root
> xyz.dir
> axy.file
>
> this is the function that I want to realize, and I try to use
> ViewFilter, but I failed.
> Can anyone provide some suggestions?
>
> coly.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03052 seconds