| Summary: | Contributed main menu item should be hidden when empty | ||
|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Stefan Mücke <s.muecke> |
| Component: | UI | Assignee: | Project Inbox <e4.ui-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | bokowski |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | stalebug | ||
In 4.0 you should get an "(none)" or "(empty)" for that menu item. PW Yes, the menu contains "(none)". However, the menu item was only meant to appear when certain "internal-use" plugins are installed. Normal users should never get this menu. Any way to tweak this behavior? (Is this part of the compatibility platform?) This is currently part of the base e4 behaviour. All contributions are tied to an SWT.Show event ... but that means that the menu must be visible to show. PW To fix this, we would have to do for top-level menus what we do for toolbar items (plus probably some code that updates menus one more level down than we currently do). Too much for 4.0 in my opinion. (In reply to comment #4) > To fix this, we would have to do for top-level menus what we do for toolbar > items (plus probably some code that updates menus one more level down than we > currently do). Too much for 4.0 in my opinion. Definitely, as we would need to continually process the menu bar entry plus its submenu, so that when a contribution appeared we could make the menu bar entry appear. This will have a rather high performance cost (and a potential activation cost) PW Removing outdated target milestone. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. This is a mass change to close all e4 bugs marked with "stalebug" whiteboard. If this bug is still valid, please reopen and remove the "stalebug" keyword. |
I encountered this bug when running my RCP application on e4. This application adds a placeholder item (like "Tools") to the main menu. By default, this main menu entry has no items, and should therefore not be visible (this works with 3.x). Note: I am adding this item via an ActionBarAdvisor: @Override protected void fillMenuBar(IMenuMananager menuBar) { menuBar.add(createToolsMenu()); }