Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 367159

Summary: Dynamic menu contributions using CompoundContributionItems are not visible
Product: [Eclipse Project] Platform Reporter: Markus Tiede <markus.tiede>
Component: UIAssignee: Paul Webster <pwebster>
Status: VERIFIED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: remy.suen, vincent.lorenzo, wiesestefan
Version: 4.2   
Target Milestone: 4.2 M5   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 366037, 367076    
Attachments:
Description Flags
Provide datafilling of dropdown tool items v01 none

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