Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Updating resource decorators in Package Explorer
Updating resource decorators in Package Explorer [message #111418] Fri, 15 August 2003 16:33 Go to next message
Eclipse User
Originally posted by: jdundon.persistence.com

I have a plug-in in which I am creating markers for my resources when build
or validation errors occur. The markers show up in the task view, but the
problem decorator is not applied to the resource in the package explorer
unless I do a build-all or stop and restart the package explorer. I am
trying to figure out what API(s) I need to call to refresh the resource
decorators in when I change the markers on my resources. I have seen
references to calling LabelProvider.fireLabelProviderChanged(), but I don't
know what label provider to call it on. Is this the API I need, and if so,
what do I call it on? If not what API should I use to refresh the problem
decorators for my resource in the package explorer when my resource markers
change? Thanks.

Jack
Re: Updating resource decorators in Package Explorer [message #765824 is a reply to message #111418] Wed, 14 December 2011 18:26 Go to previous messageGo to next message
valentin Mising name is currently offline valentin Mising name
Messages: 36
Registered: December 2011
Member
Nobody knows. You have addressed the very matters: everybody knows that this method needs to be called but nobody know how. This is the way Eclipse works.
Re: Updating resource decorators in Package Explorer [message #766247 is a reply to message #765824] Thu, 15 December 2011 12:52 Go to previous message
valentin Mising name is currently offline valentin Mising name
Messages: 36
Registered: December 2011
Member
Ok, the secret was disclosed:

Display.getDefault().asyncExec(new Runnable() {
    public void run() {
	IDecoratorManager idm = PlatformUI.getWorkbench().getDecoratorManager();
	idm.update("your decorator ID that you specified in plugin.xml"); 
						       }
						});


At least it works for me.
Previous Topic:How should I call fireLabelProviderChanged
Next Topic:Common Navigator Framework - show standard menu items
Goto Forum:
  


Current Time: Mon Oct 20 08:18:01 GMT 2014

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

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