Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 23:28 Go to next message
Frank Du is currently offline Frank DuFriend
Messages: 12
Registered: July 2009
Junior Member
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 04:52 Go to previous message
Francis Upton IV is currently offline Francis Upton IVFriend
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.


Previous Topic:How to override in Common Navigation Framework
Next Topic:usage of dropAssistant for org.eclipse.ui.navigator.navigatorContent
Goto Forum:
  


Current Time: Fri Apr 19 21:50:07 GMT 2024

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

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

Back to the top