Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Common Navigator Framework - Trigger refresh
Common Navigator Framework - Trigger refresh [message #731204] Fri, 30 September 2011 05:06 Go to next message
Eclipse UserFriend
Hi,

is there a way to programmatically trigger a refresh of all navigators?

Background is that I have a custom decorator. On changes of that decorator I want all the labels to be refreshed (not the resources though)

thanks
Christian
Re: Common Navigator Framework - Trigger refresh [message #731286 is a reply to message #731204] Fri, 30 September 2011 10:12 Go to previous messageGo to next message
Eclipse UserFriend
There is nothing that knows about all instances of the Common Navigator, so you have to know about them and refresh them yourself.
Re: Common Navigator Framework - Trigger refresh [message #733590 is a reply to message #731286] Wed, 05 October 2011 02:59 Go to previous messageGo to next message
Eclipse UserFriend
I found a way to achieve this for some cases by triggering the refresh command:

// trigger a refresh
IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
if (handlerService != null) {
	try {
		handlerService.executeCommand("org.eclipse.ui.file.refresh", null);
	} catch (Exception e) {
	}
}


Not exactly what I wanted but helps in some cases.
Re: Common Navigator Framework - Trigger refresh [message #733831 is a reply to message #733590] Wed, 05 October 2011 14:23 Go to previous message
Eclipse UserFriend
If you have a resource available you can call refreshLocal() on it:

IFile resource = <get resource somehow>
if (resource != null) resource.refreshLocal(IResource.DEPTH_INFINITE, monitor);
Previous Topic:Cannot save proxy authentication details
Next Topic:Adding a predefined popup menu to a TreeViewer without an id
Goto Forum:
  


Current Time: Sat Jul 05 13:30:31 EDT 2025

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

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

Back to the top