Common Navigator fails to refresh on addition/deletion [message #337098] |
Mon, 27 July 2009 19:28  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.05074 seconds