Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Common Navigator fails to refresh on addition/deletion
Common Navigator fails to refresh on addition/deletion [message #337098] Mon, 27 July 2009 19:28 Go to next message
Eclipse UserFriend
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
Re: Common Navigator fails to refresh on addition/deletion [message #486791 is a reply to message #337098] Sat, 19 September 2009 00:52 Go to previous message
Eclipse UserFriend
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.
Previous Topic:How to override in Common Navigation Framework
Next Topic:usage of dropAssistant for org.eclipse.ui.navigator.navigatorContent
Goto Forum:
  


Current Time: Tue May 06 17:24:50 EDT 2025

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

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

Back to the top