Community
Participate
Working Groups
Build Identifier: 3.4.2.R342_v20090122 I currently have to duplicate xml to add a pop up menu to multiple areas in the IDE I would like to specify a menu item for each of the target id's below but to do this i need to create 4 viewer contributions with repeated xml in. When you expand this to more menus the maintainance of them becomes an issue, where one change will need to be reflected in several places in the xml. "#TextEditorContext" "#CompilationUnitEditorContext" "#TextRulerContext" "#CompilationUnitRulerContext" Reproducible: Always Steps to Reproduce: N/A
We won't change the org.eclipse.ui.popupMenus extension. That's already deprecated in 4.x, and has been "secondary" in 3.x since 3.3. But just FYI, there's an #AbstractTextEditorContext that's common to both "#TextEditorContext" and "#CompilationUnitEditorContext". Similar thing for #TextRulerContext. In org.eclipse.ui.menus/menuContribution it is possible to do what you want, either by placing a submenu in all the locations you want, then the contents of the submenu are in one place only, or by placing your command contributions in the popup.any location (all popups) and then adding a visibleWhen that checked org.eclipse.ui.ISources.ACTIVE_MENU_NAME contains the correct ID PW