title: How to add a submenu entry to Eclipse Package Explorer context menu item using org.eclipse.ui.menus?
body: <p>I am trying to add a submenu entry to an item from the context menu of the Eclipse Package Explorer.</p>
  
  <p>The menu entry is already defined via org.eclipse.ui.popupMenus in another plugin, not in the one that I am working at. (That plugin is added to the dependencies list of my plugin). There are also items added in its submenu, but also using org.eclipse.ui.popupMenus, and I am trying to do this via org.eclipse.ui.menus.</p>
  
  <p>To begin with, I did the following:</p>
  
  <ul>
  <li>I added org.eclipse.ui.commands and org.eclipse.ui.menus extensions.</li>
  <li>I defined a command , respectively a menuContribution like this: </li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/XY7nj.png" alt="enter image description here"></p>
  
  <p>This adds the item in any context menu... So I would have to replace "org.eclipse.ui.popup.any?after=additions" from the locationURI with the id of the submenu I want my item to appear in.</p>
  
  <p><b>My problem is: how to determine a correct locationURI?</b>
  I used the menu spy (ALT+SHIFT+F2) and inspected the submenu I want to contribute to, and I received the following URI: </p>
  
  <p>menu:YYY?after=ZZZ, where:</p>
  
  <p>YYY is the id of the menu that is already defined and to which I want to add the submenu item
  ZZZ is the id of the action from the submenu, that I clicked upon (using the spy)</p>
  
  <p>I tryied the following, but the submenu item does not appear:</p>
  
  <ul>
  <li>menu:YYY[?after=additions]</li>
  <li>popup:YYY[?after=additions]</li>
  </ul>
  
  <p>Please help :)</p>