views:

186

answers:

1

I have a command available in the eclipse context menu when I right click on a project folder. THe submenu is visible in what I believe is the 'additions' section of the context menu. However, I want a line separator do distinguish my contribution from other additions. How can I do this? I know that with action contributions, you can use menuBarPath (I think) to create a group and add actions to it, but how can I do this using the menuContribution tag in plugin.xml?

<extension point="org.eclipse.ui.menus">
  <menuContribution locationURI="popup:org.eclipse.ui.popup.any?after=additions">
     <menu label="PopKit">
        <command
         commandId="convertToAppKitProjectCommand"
         mnemonic="S"
         id="ie.ondevice.popkit.plugin.menus.popup.convertProjectCommand">
             <visibleWhen>
                <with variable="activeMenuSelection">
                   <iterate>
                      <adapt type="org.eclipse.core.resources.IProject"/>
                   </iterate>
                </with>
             </visibleWhen>          
        </command>
     </menu>
  </menuContribution>

A: 

Add a separator to your menu in the contribution:

<menuContribution locationURI="popup:org.eclipse.ui.popup.any?after=additions">
    <menu label="PopKit">
       <separator
             name="some.id.here.">
       </separator>
       <command
             commandId="convertToAppKitProjectCommand"

       // the rest ...
Prakash G. R.