Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsenabledWhen + menus without commands
https://www.eclipse.org/forums/index.php/mv/msg/244489/733442/#msg_733442
So I'm starting to get familiar with how the menus, commands and handlers work together and how the activeWhen, enabledWhen and visibleWhen properties function.
However, I cannot seem to find a way to have a menu disabled. Say I have that "New" menu containing commands such as "New Square", "New Triangle", etc. I can make these commands disabled by using enabledWhen on their handlers.
Thing is I would like the "New" menu itself to be greyed out (disabled) when all its subitems (commands) are disabled, and I cannot figure out how. Menus only seem have a visibleWhen property.
Is there any way to achieve this?
Short version of the above: can't a menu (as in menu defined in a menuContribution) be disabled when it's not linked to a command?
Thanks in advance.
Jérémy]]>sielver Mising name2011-10-04T18:24:39-00:00Re: enabledWhen + menus without commands
https://www.eclipse.org/forums/index.php/mv/msg/244489/734217/#msg_734217
sielver Mising name2011-10-07T06:21:42-00:00Re: enabledWhen + menus without commands
https://www.eclipse.org/forums/index.php/mv/msg/244489/753652/#msg_753652
If menu has commands which aren't handled, the menu will not be visible.
If menu has at least one command which is handled (even disabled) , the menu will be shown.