| Summary: | MenuContribution with visibleWhen Expression still visible when false | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Thomas Kratz <eiswind> | ||||
| Component: | UI | Assignee: | Remy Suen <remy.suen> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | pwebster | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 4.1 RC2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Can anyone take a look at this? Would be great if I could hide the menu after all that it has no items. Created attachment 195903 [details]
Menu contributions patch v1
Change our menu contribution to have a visibleWhen expression set on it. Also altered the code so that if a contribution goes to the menu bar, we are always tracking its visibility even if the menu contribution itself doesn't have an expression (as one of its children may have one).
Looks fine, released to HEAD PW Thank you for the bug report, Thomas! Sorry it took so long to get back to you on this. |
Build Identifier: e4.1 M6 Hi I contibute a menu with some items with a visiblewhen expression. After SourceProviders are working now the items work fine but the menu itself still is there when the expression is false <menuContribution allPopups="true" locationURI="menu:org.eclipse.ui.main.menu?after=additions"> <menu id="de.eiswind.mango.client.menu.admin" label="%administration" tooltip="%administration"> <visibleWhen> <with variable="de.eiswind.mango.client.core.user.isadmin"> <equals value="enabled"> </equals> </with> </visibleWhen> </menu> </menuContribution> Reproducible: Always Steps to Reproduce: 1. create a menu with visibleWhen= false 2. menu is still visible 3.