My plugin can't add to menu when right-clicking the editor [message #1786092] |
Wed, 25 April 2018 12:58 |
Kevin Söderberg Messages: 1 Registered: April 2018 |
Junior Member |
|
|
I'm currently making a plugin for CDT where I want to add a menu item to the menu that pop up when you right-click the editor. So far I have been unable to hook into that specific part unless i use the URI=org.eclipse.ui.popup.any. But that gives me the problem that it adds it to every popup menu in eclipse.
General code for that part is:
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="popup:org.eclipse.ui.popup.any?before=additions">
<menu
label="Test Menu"
mnemonic="U"
tooltip="List of items">
<command
commandId="testing.commands.runOne"
label="Run for One"
mnemonic="R"
style="push"
tooltip="Tooltip test 1">
</command>
<command
commandId="testing.commands.runTwo"
label="Run for Two"
mnemonic="G"
style="push"
tooltip="Tooltip test 2">
</command>
<command
commandId="testing.commands.runThree"
label="Run for Three"
mnemonic="E"
style="push"
tooltip="Tooltip test 3">
</command>
</menu>
</menuContribution>
</extension>
I've tried to use following locationURIs:
org.eclipse.cdt.ui.editor.CEditor
org.eclipse.cdt.ui.editor.CEditor.EditorContext
org.eclipse.cdt.ui.editor.CEditor.RulerContext
org.eclipse.cdt.ui.editor.CEditor#PopupMenu
org.eclipse.cdt.ui.editor.EditorContext#PopupMenu
org.eclipse.cdt.ui.editor.CEditor.RulerContext#PopupMenu
What locationURI is required to hook into that menu?
Best Regards,
Kevin
|
|
|
Powered by
FUDForum. Page generated in 0.05687 seconds