Jface treeview partial collapse after I perform a refresh? [message #301674] |
Tue, 04 April 2006 04:18  |
Eclipse User |
|
|
|
Hi.
I'm having problems when I call refresh on a treeview.
I have a simple directory/file list program that is displayed in a JFace
treeview.
If I start my program and do an expandAll() on the tree, then manually
create a new file (in a seperate console window;eg. touch file.txt), then
call refresh on the tree view, the new file will be displayed in the tree
view - but all the nodes that appear after the new file in the treeview
have partially collapsed (they don't fully collapse, but expand to only
one level - they don't expand back to their previous state)? The tree that
appears above the new file is in its correct expanded state.
I call refresh as follows:
Object[] expandedObjs = tv.getExpandedElements();
tv.refresh();
tv.setExpandedElements(expandedObjs);
Have I missed something? I can't find any good documentation on how to use
the above functions correctly, so I may be doing this wrong? Maybe I need
to insert the file into the tree view using a different treeview function?
Thanks
Mark Robinson
|
|
|
Re: Jface treeview partial collapse after I perform a refresh? [message #301706 is a reply to message #301674] |
Tue, 04 April 2006 10:05  |
Eclipse User |
|
|
|
Originally posted by: bokowski.ca.ibm.com
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=113675
Boris
"Mark Robinson" <mr@prismtech.com> wrote in message
news:910fdc0d8bcd5bbc3ff4fd2497b91d4f$1@www.eclipse.org...
> Hi.
>
> I'm having problems when I call refresh on a treeview.
>
> I have a simple directory/file list program that is displayed in a JFace
> treeview.
>
> If I start my program and do an expandAll() on the tree, then manually
> create a new file (in a seperate console window;eg. touch file.txt), then
> call refresh on the tree view, the new file will be displayed in the tree
> view - but all the nodes that appear after the new file in the treeview
> have partially collapsed (they don't fully collapse, but expand to only
> one level - they don't expand back to their previous state)? The tree that
> appears above the new file is in its correct expanded state.
>
> I call refresh as follows:
>
> Object[] expandedObjs = tv.getExpandedElements();
> tv.refresh();
> tv.setExpandedElements(expandedObjs);
>
> Have I missed something? I can't find any good documentation on how to use
> the above functions correctly, so I may be doing this wrong? Maybe I need
> to insert the file into the tree view using a different treeview function?
>
> Thanks
> Mark Robinson
>
|
|
|
Powered by
FUDForum. Page generated in 0.06168 seconds