I have written a simple Eclipse plug-in and wanted to extend the Refactor (alt+shit+T) menu with a new item that would invoke my code.
Unfortunately, after having spent hours researching the possible solutions, I have failed.
I tried some solutions suggested online, but none worked, maybe because I'm using the latest Eclipse Luna and from what I understand the refactoring menu is (was?) defined as something called action sets, and it's apparently deprecated now.
I was able to extend the top-level popup menu using the new commands API, but that's not what I want.
I would just love to see a working example of plugin.xml that adds a custom item to the Refactor popup menu.
Just for the reference, this doesn't work:
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="menu:org.eclipse.jdt.ui.refactoring.menu?after=typeGroup">
<command
commandId="mycommandid"
label="mycommandlabel">
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.commands">
<command
id="mycommandid"
name="mycommandname">
</command>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="MyHandlerClass"
commandId="mycommandid">
</handler>
</extension>