Disabling A Context Menu Item Depending On Where You Are In A Tree [message #333100] |
Tue, 25 November 2008 21:15 |
Andy Messages: 47 Registered: July 2009 |
Member |
|
|
I have a plugin that displays a tree. When you right mouse click on one
of the nodes in the tree, a menu appears with navigation buttons as well
as other actions that someone can take on node of the tree. The
navigation buttons are managed through a DrillDownAdapter that seems to be
able to query each node and then figure out if it should grey out certain
items, like if it is at the lowest node of the tree it will grey out the
arrow to go lower in the tree structure.
I have searched all around for an example to basically do the same
functionality but come up empty. Based on a string stored in each node, I
want to be able to grey out certain items in the context menu just like
the drilldownadapter does for the navigation. Right now I am adding the
menu items like
manager.add(myAddedMenu);
which makes the menu item show all the time no matter what the node may
be. Anyway, any help at all would be appreciated. I am using the latest
version of Eclipse.
|
|
|
Powered by
FUDForum. Page generated in 0.03098 seconds