[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] ProblemJface treeview refresh() collapses nodes?

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, then call refresh on the tree view, the new file will be displayed - but all the nodes that appear after the new file in the treeview collapse to only one level, they don't expand back to their previous state?

I call refresh as follows:

Object[] expandedObjs = tv.getExpandedElements();
tv.refresh();
tv.setExpandedElements(expandedObjs);

Have I missed something?

Thanks
Mark Robinson