| Summary: | [Contributions] viewerContributions to an empty submenu | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Alin Alexandru <alin.alexandru> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P5 | CC: | andriy.rysin, mistria |
| Version: | 3.1 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
|
Description
Alin Alexandru
Can you point me to the section of code where you think the problem is occurring? I think the problem is that you add a SubContributionItem to an empty submenu of an empty context menu (not visible), then make the item not visible too. This problem occurs only if make a contribution to an empty submenu. I don't have a solution yet but here is a copy/paste from my debug tree: SubMenuManager.isVisible() line: 287 -> here set the SubMenuManager visibility to false because there are no items except Separators SubMenuManager.wrapMenu(IMenuManager) line: 391 ->here create a SubMenuManager - visible=false SubMenuManager.getWrapper(IMenuManager) line: 244 SubMenuManager.find(String) line: 165 SubMenuManager.findUsingPath(String) line: 202 SubMenuManager.findMenuUsingPath(String) line: 179 -> return submenu (visible = false) .. PluginActionBuilder.contributeMenuAction(..) line: 329 - here call insertAfter(..) line 353 .. PopupMenuExtender.addStaticActions(IMenuManager) line: 257 PopupMenuExtender.menuAboutToShow(IMenuManager) line: 274 MenuManager.fireAboutToShow(IMenuManager) line: 285 I can confirm that, if I add the submenus to to viewerContribution they're not shown unless I add an some action to menu in Java code. Adding separator does not help. Moving Dougs bugs Assigning to component owner PW Action, popupMenus and viewerContribution extensions are deprecated in favor of org.eclipse.ui.commands/org.eclipse.ui.menus. No work will be planned about actions. |