Bug 221662 - [Contributions] Extension point org.eclipse.ui.menus: sub menu contribution does not have icon even if specified
Summary: [Contributions] Extension point org.eclipse.ui.menus: sub menu contribution d...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-03-06 09:38 EST by Uwe Stieber CLA
Modified: 2008-05-01 09:59 EDT (History)
1 user (show)

See Also:


Attachments
Sample project to reproduce the problem. (3.13 KB, application/octet-stream)
2008-03-06 13:34 EST, Remy Suen CLA
no flags Details
Patch to initialize the MenuManager with an ImageDescriptor if one is available. (1.62 KB, patch)
2008-03-06 13:44 EST, Remy Suen CLA
no flags Details | Diff
Updated patch against HEAD. (1.33 KB, patch)
2008-03-28 23:16 EDT, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Stieber CLA 2008-03-06 09:38:31 EST
If using org.eclipse.ui.menus for contributing an additional menu to the Eclispe main menu and this contribution contains another sub menu, the sub menu does not have the specified icon.

...
<extension point="org.eclipse.ui.menus">
   <menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=project">
      <menu id="my.main.menu"
            label="%my.main.menu.label">
         <separator name="groupA" visible="true"/>
         <separator name="groupB" visible="true"/>
         ...
         <separator name="groupX" visible="true"/>
         <separator name="additionsGroup" visible="true"/>
      </menu>
   </menuContribution>
   ...
   <menuContribution locationURI="menu:my.main.menu?after=groupB">
         <menu
               icon="icons/elcl16/system_mode.gif"
               id="my.subMenu"
               label="%MySubmenu.label"
               tooltip="%MySubmenu.tooltip">
            <dynamic class="x.y.z.MySubmenuContributionItem" id="my.SubmenuContribution">
            </dynamic>
         </menu>
      </menuContribution>
...

The icon is not painted in front of the menu but should.
Comment 1 Remy Suen CLA 2008-03-06 13:34:42 EST
Created attachment 91783 [details]
Sample project to reproduce the problem.

Thanks for the bug report, Uwe! I have reproduced this locally on my computer using the I20080304-1113 build.
Comment 2 Remy Suen CLA 2008-03-06 13:44:10 EST
Created attachment 91784 [details]
Patch to initialize the MenuManager with an ImageDescriptor if one is available.
Comment 3 Remy Suen CLA 2008-03-28 23:16:03 EDT
Created attachment 94094 [details]
Updated patch against HEAD.

This is still a problem on I20080327-2251. The original patch is no good anymore so here's a new one.
Comment 4 Paul Webster CLA 2008-04-08 10:27:45 EDT
Released to HEAD >20080408
PW
Comment 5 Paul Webster CLA 2008-05-01 09:59:45 EDT
In I20080501-0100
PW