3

During menu added into the main menu of eclipse which has sub-menus. I need these sub-menus to be enabled/disabled based on a condition

which I can check programmatically.

Enabling/Disabling the items via plugin.xml is static, even if a condition can be checked it is only after we click on the menu item.

How to happen at run time when the user clicks the Menu itself rather than the sub-menu items.

  • when you open a menu like `Edit` you want menu items to be disabled? Or you want `Edit` sub-menus to have their availability already calculated? – Paul Webster Nov 09 '11 at 19:05

1 Answers1

0

Use action enablement property in plugin.xml, refer to http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_actionSets.html

codejammer
  • 1,636
  • 1
  • 14
  • 27