Enabling Menu action based on a tree node object type [message #202029] |
Wed, 25 February 2004 20:59 |
Eclipse User |
|
|
|
Originally posted by: sreejaak.yahoo.com
Hi,
I have a menu action class(OpenAction) which is implementing
IWorkbenchWindowActionDelegate. In the workspace I have a view with a
TreeViewer which contains nodes of type 2 class types ClassA and ClassB.
In my plugin.xml, I have given the following entry for OpenAction
<action id="com_xxx_yyy_action_OpenAction"
menubarPath="com_xxx_yyy__menus/slot1"
toolbarPath="Editor"
label="&Open Editor @Ctrl+E"
icon="icons/full/OpenAction.gif"
tooltip="OpenEditor"
class="com.xxx.yyy.action.OpenAction">
<enablement>
<objectClass name="com.xxx.yyy.model.ClassA"/>
</enablement>
</action>
The action is visible as disabled in the menu and the tool bar. But it
remains disabled even when I select the ClassA's tree node in the view. Do
I need to add any more entries in the plugin.xml? Sshould I do something
more in the View class or ClassA or OpenAction class to associate the
action with this class type in the tree view?
Thanks in advance for the help!
Sree
|
|
|
Powered by
FUDForum. Page generated in 0.01897 seconds