Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Common Navigator Framework - Trigger refresh
Common Navigator Framework - Trigger refresh [message #731204] Fri, 30 September 2011 09:06 Go to next message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 250
Registered: July 2009
Location: Graz, Austria
Senior Member
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 14:12 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
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 06:59 Go to previous messageGo to next message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 250
Registered: July 2009
Location: Graz, Austria
Senior Member
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 18:23 Go to previous message
Lubos Pochman is currently offline Lubos PochmanFriend
Messages: 29
Registered: July 2009
Junior Member
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: Thu Mar 28 18:56:57 GMT 2024

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

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

Back to the top