|Re: Eclipse 3.6: org.eclipse.ui.commands.IElementUpdater - How to update before beeing executed? [message #633768 is a reply to message #633656]
||Tue, 19 October 2010 10:57
| Prakash G.R.
Registered: July 2009
On 18/10/10 10:58 PM, Jan Kohnert wrote:|
> I've some commands that have org.eclipse.ui.handlers that implement
> their behavior. This handlers implement
> org.eclipse.ui.commands.IElementUpdater to update the label and
> description of the menu entries being used. I discovered that as long
> one command has not been executed, its handler stays uninitialized and
> thus the updateElement is not getting executed at all. How can I make
> the handler to get created (I realy mean created, calling c'tor and
> stuff, not executed) before the command has been used? It's hard to
> explain when commands have proper labeling after being used, but not
> before... :)
Eclipse tries lazy loading of the plugins. So unless your plugin is
loaded, the updateElement of your handler won't be called. You can
probably extend org.eclipse.ui.startup to activate your plugin, which
should be done with care, as if affects the Eclipse startup performance.
What is your usecase?
Platform UI Team, IBM
Powered by FUDForum
. Page generated in 0.05399 seconds