In developing the Eclipse plugin, I was able to add an item to the right-click context menu in the project explorer by doing the following:
<extension point="org.eclipse.ui.menus"> <menuContribution locationURI="popup:org.eclipse.jdt.ui.PackageExplorer"> <command ... > ... </command> </menuContribution> </extension>
But when I try to add to the popup menu for ConsoleView, I get no results.
<extension point="org.eclipse.ui.menus"> <menuContribution locationURI="popup:org.eclipse.ui.console.ConsoleView"> <command ... > ... </command> </menuContribution> </extension>
I watched the output from alt-shift-F1 and alt-shift-F2 (Plug-in Spy), in which I got org.eclipse.ui.console.ConsoleView . But I can’t get into the popup menu. I can get information about individual elements of the pop-up menu ("Select All", "Clear", etc.), but I think that I just don’t quite understand how to "dig" using Plug-in Spy to get the right one information.
EDIT: Show the results of my work using the answer below
Spy's connectivity choices had the following:
Active Part (Console) The active view identifier: org.eclipse.ui.console.ConsoleView Active Selection The selection class: TextSelection Active Help The active help context identifiers: org.eclipse.debug.ui.process_console_context
This was the last entry that pointed to the process console. , not the message console. The link in the response had IDebugUIConstants.ID_PROCESS_CONSOLE_TYPE , defined as org.eclipse.debug.ui.ProcessConsoleType . So I ended up with this and it worked:
<menuContribution locationURI="popup:org.eclipse.debug.ui.ProcessConsoleType.#ContextMenu"> <command commandId="com.grch.cmgtsdk.merge" label="Yowza!" style="push"> </command> </menuContribution>
source share