Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Enabling Menu action based on a tree node object type
Enabling Menu action based on a tree node object type [message #202029] Wed, 25 February 2004 20:59
Eclipse UserFriend
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="&amp;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
Previous Topic:dynamic context menus
Next Topic:Difficulty with AWT/Swing Applets
Goto Forum:
  


Current Time: Sat May 10 03:47:21 EDT 2025

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

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

Back to the top