0

I wanted to add a menu item to the Source popup, and I got it working with the following plugin.xml fragment:

 <menuContribution allPopups="true" locationURI="popup:org.eclipse.jdt.ui.source.menu">
        <command
              commandId="pl.axit.eclipse.bundle.commands.convertToBundle"
              id="pl.axit.eclipse.bundle.menus.convertToBundle"
              label="Extract bundle" >
        </command>
  </menuContribution>

And it works after I click the right mouse button and then select Source I can see my Extract bundle item. Great.

Using the mouse, everything works

But... when I open the Source menu with a shortcut (alt+shift+s) then my Extract Bundle isn't there! Any idea why and how to make it appear after using the shortcut?

My item is absent when using the shortcut to bring up the Source popup

siledh
  • 3,268
  • 2
  • 16
  • 29
  • 1
    It's rather an insanity check, but have you checked if the two popup menus have the same ids? You can use the Plugin Spy for that (Alt+Shift+F2). It looks like in the second case it is not a submenu. So maybe th ids are different. – Calon Jul 10 '14 at 13:38
  • For the menu showing up after using the shortcut, the active contribution location URI is "menu:null"... So yeah, it's different. But now what? – siledh Jul 10 '14 at 13:45
  • Hmm, from what I have read, the problem seems to be that the meun items are added by the old Action framework instead of the Commands framework. I am unsure how to add items to that one, atm. Maybe I find the time to play around with that over the weekend.You could try to start from there in the mean time: http://stackoverflow.com/questions/7113380/how-to-extend-the-source-menu-in-eclipse-or-what-is-its-locationuri – Calon Jul 11 '14 at 07:54

0 Answers0