Relationship between Action and ActionDelegate [message #464697] |
Tue, 13 March 2007 17:02 |
Eclipse User |
|
|
|
Originally posted by: C.O'Mahony.pilz.ie
Hi
In an existing application I have an action that is declared in my
plugin.xml as an extension point in an actionSet
<action
class="mypackage.MyAction"
id="mypackage_MyAction"
menubarPath="file/generator"
style="push"/>
Currently this MyAction class extends WorkbenchWindowActionDelegate and
implements the run(IAction action) method.
Now what I want to do is to programatically enable/disable this action
based on the state of application.
From reading through this newsgroup it looks like one of my options is
to make this action retargetable in the plugin.xml, and then register it
as a Global action in ApplicationActionBarAdvisor by calling
getActionBarConfigurer().registerGlobalAction(IAction action)... Is this
correct? Or do I have another option?
However I'm wondering what the relationship is between the IAction (or
Action) I need to register as a global action and my current class that
is a WorkbenchWindowActionDelegate? Is there a way I can create the
IAction from within my WorkbenchWindowActionDelegate class and register
this as a global action? Or do i need to implement/extend a different
set of classes/interfaces?
Thanks for your help?
|
|
|
|
Powered by
FUDForum. Page generated in 0.07526 seconds