Project: Eclipse_Platform_UI
Bug 243742 [Contributions] Registering a PRIVATE popup menu
Reported: 2008-08-11 08:36:57 | Status: verified fixed

Build ID: I20080617-2000 Steps To Reproduce: This is an enhancement request. The "org.eclipse.ui.popup.any" allows to add a menuitem to ALL registered popup menus in the system. Some plugins (debug, team) misuse this possibility and register actions which are too wide and appear everywhere. This leads to popup menu pollution. More information: It would be great to be able to register a popup menu privately in a way that only the menuitems directly specifing the id woul only be added to it (but not those that specify org.eclipse.ui.popup.any) For example, contributions to a menu with an ID: org.example.editor.popup#private would be added only if the contributor specifies exactly the ID (org.example.editor.popup#private). Contributions specifying the org.eclipse.ui.popup.any would be ignored for this popup.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuAdditionCacheEntry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WorkbenchMenuService.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/MenuPopulationTest.java