| Summary: | [Contributions] visible/enabled: Object contributions contributed to submenus do not show up | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dmitry Karasik <Dmitry_Karasik> | ||||
| Component: | UI | Assignee: | Douglas Pollock <douglas.pollock> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P2 | CC: | eclipse, edebolle, jean-michel_lemieux, rbarthold, sxenos | ||||
| Version: | 3.2 | Keywords: | helpwanted | ||||
| Target Milestone: | 3.2 M6 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Dmitry Karasik
Dimitry, can you ship without having this fixed? We use dynamic submenus for object contributions. I would like to have a submenu for a number of related actions that are only interesting rarely to a few people, to avoid cluttering the main menu which has frequently needed actions. The work around is to put everything into the main menu. Dmitry: Can you provide a patch? Yes, in SubMenuManager.wrapMenu() simply replace
mgr.setVisible(isVisible());
with
mgr.setVisible(super.isVisible());
This solves the sub menu contribution problem without affecting anything else.
Although SubMenuManager.isVisible() should be looked at as the circumstances under which it makes sense for a child to call parent.isVisible() are unclear to me.
Interesting. The introduction of an "isVisible" method to SubMenuManager was introduced as part of a fix for Bug 47098. I have tried to reproduce this problem, but I think I may be missing something (as it does seem like there is a flaw). Can you provide a small test case showing the problem? (I have tried the first example in the popupMenus extension point.) *** Bug 130425 has been marked as a duplicate of this bug. *** Created attachment 35839 [details]
A plugin (w/source) to show the problem
The plugin registers an object contribution on java.lang.Object, so you can see its actions show up pretty much anywhere. You will notice in the package explorer the submenu does show up (because the context menu is prepopulated), but in the view provided in the plugin if you try to open the context menu only the action added to additions shows up.
*** Bug 130785 has been marked as a duplicate of this bug. *** I have removed the isVisible method for SubMenuManager. This change should appear in I20060314-0800 and later. When that build becomes available, could those seeing this bug please confirm that the fix works for them? Thanks. I downloaded and tested eclipse-SDK-I20060314-1200-linux-gtk.tar.gz and this issue appears fixed to me. Thanks Doug. |