VisibleWhen core expression not working for Menu [message #988845] |
Mon, 03 December 2012 07:57  |
Eclipse User |
|
|
|
Hi,
I am trying to work with visibleWhen expressions like I did in Eclipse 3.x
I have a menu that should become visible when a special state has changed.
I know it can be done by setting the visible flag on MMenu, but for menu items, the core expressions are supported and working fine. So the visible state can be changed in a declarative way via core expressions, while it doesn't work for menus.
<children xsi:type="menu:Menu" xmi:id="_hHh3gA71EeKHWs52dCVHSA" elementId="myMenu" label="%menuView">
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_a76vAD1GEeKO6rLowasyrA" coreExpressionId="myExpression"/>
<children xsi:type="menu:HandledMenuItem" xmi:id="_cxlUABKwEeKc-_aDwX6lwg" elementId="myHandler" label="Do something" iconURI="platform:/plugin/myapp/icons/file_obj.gif" command="_g5JbwBKvEeKc-_aDwX6lwg">
</children>
<children xsi:type="menu:DirectMenuItem" xmi:id="_yLT5kBLPEeKc-_aDwX6lwg" elementId="myDirectHandler" label="Do something else" selected="true" type="Check">
<visibleWhen xsi:type="ui:CoreExpression" xmi:id="_BBq-ED1HEeKO6rLowasyrA" coreExpressionId="myExpression"/>
</children>
</children>
The question is, is using core expressions the way to manage the visible state in a declarative way in Eclipse 4 like it was in Eclipse 3.x?
If it is, should menus also be able to use core expressions like the Application Model Editor supposes to (you have the option to add one via the editor)?
And if so, is this bug already reported?
Greez,
Dirk
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.25017 seconds