|
Re: Common Navigator fails to refresh on addition/deletion [message #486791 is a reply to message #337098] |
Sat, 19 September 2009 04:52 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Francis Upton IV![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=francisu%40ieee.org) Messages: 472 Registered: July 2009 Location: Oakland, CA |
Senior Member |
|
|
Frank Du wrote on Mon, 27 July 2009 19:28 | Dear All,
I subclassed CommonNavigator in my plug-in. The navigator content is not
local resource, but resource on the server side. Therefore I created
domain model for them. The tree viewer can be populated properly.
But, the CommonViewer fails to refresh its tree view after
addition/deletion. I use the content provider as model listener. For
add/delete/update events, I use source code like below. Any idea how to
enable the refresh function? Any input is appreciated.
new UIJob("refresh"){
public IStatus runInUIThread(IProgressMonitor monitor) {
// ...... test if viewer is disposed
viewer.refresh(element);
return Status.OK_STATUS;
}
}.schedule();
By the way, I also tried other way: find my CommonNavigator instance, and
then use CommonViewer to refresh the tree. It doesn't work either.
Best Regards,
Frank Du
|
Have you stepped through the CommonViewer refresh call in the debugger? It should refresh things properly. Try to see what's going wrong if you can.
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Powered by
FUDForum. Page generated in 0.05403 seconds