Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367159 - Dynamic menu contributions using CompoundContributionItems are not visible
Summary: Dynamic menu contributions using CompoundContributionItems are not visible
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: 4.2 M5   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 356309 367823 (view as bug list)
Depends on:
Blocks: 366037 367076
  Show dependency tree
 
Reported: 2011-12-20 04:34 EST by Markus Tiede CLA
Modified: 2012-01-24 13:11 EST (History)
3 users (show)

See Also:


Attachments
Provide datafilling of dropdown tool items v01 (3.25 KB, patch)
2012-01-16 13:22 EST, Paul Webster CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Tiede CLA 2011-12-20 04:34:59 EST
We are currently having problems with CompoundContributionItems when our Jubula Juno M4 feature runs in 4.2 context (see bug 367076).

We are intensively using dynamic menu contributions in the main toolbar as well as in view toolbars. The button for the dynamic menu itself gets shown but it has neither a dropdown arrow nor a dropdown menu. The following code works fine in 3.7.x

The code for one of our CompoundContributionItems can be found at:

http://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/tree/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/contributionitems/StartAutContributionItem.java#n39

And the dynamic declarative menu extension for the main toolbar is here:

http://git.eclipse.org/c/jubula/org.eclipse.jubula.core.git/tree/org.eclipse.jubula.client.ui.rcp/plugin.xml#n1410
Comment 1 Paul Webster CLA 2011-12-20 09:03:00 EST
Dynamic items are currently getting through.

org.eclipse.ui.internal.menus.MenuAdditionCacheEntry.createMenuCommandAddition(IConfigurationElement) needs to correctly generate a tool item with a menu with the correct ID so it can be shown.

org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.getMenu(MMenu, ToolItem) needs to go through the MenuManagerRenderer for standard MMenus.

PW
Comment 2 Paul Webster CLA 2012-01-16 13:22:45 EST
Created attachment 209575 [details]
Provide datafilling of dropdown tool items v01

Create the MMenu required, and call createGui(*) at the appropriate time.

PW
Comment 3 Paul Webster CLA 2012-01-17 08:26:07 EST
*** Bug 367823 has been marked as a duplicate of this bug. ***
Comment 5 Paul Webster CLA 2012-01-17 08:46:46 EST
*** Bug 356309 has been marked as a duplicate of this bug. ***
Comment 6 Paul Webster CLA 2012-01-24 13:11:14 EST
In I20120123-2200
PW