eclipse - Add a new sub menu to compare with menu in Package explorer and project explorer -
i trying add new command "compare with" menu present in context menu of package explorer , project explorer. command getting displayed in package explorer. not getting command in project explorer. want command present in these 2 views. below code.
<menucontribution allpopups="false" locationuri="popup:org.eclipse.jdt.ui.packageexplorer?after=additions"> <menu id="comparewithmenu" label="compare with"> <separator name="comparewithgroup"> </separator> </menu> </menucontribution> <menucontribution allpopups="false" locationuri="popup:org.eclipse.ui.navigator.projectexplorer?after=additions"> <menu id="comparewithmenu" label="compare with"> <separator name="comparewithgroup"> </separator> </menu> </menucontribution> <menucontribution allpopups="false" locationuri="popup:comparewithmenu?after=additions"> <command commandid="com.test.comparewitheachother" label="compare each other" style="push"> <visiblewhen checkenabled="true"> </visiblewhen> </command> </menucontribution> <menucontribution allpopups="false" locationuri="popup:comparewithmenu?after=additions"> <command commandid="com.test.comparewitheachother" label="compare each other" style="push"> <visiblewhen checkenabled="true"> </visiblewhen> </command> </menucontribution>
i tried changing id menu contribution also. in package explorer new compare option coming. think expected. want command present in these 2 views. missing something?
the popup menu id project explorer appears be
org.eclipse.ui.navigator.projectexplorer#popupmenu
alternatively pde plugin uses:
<menucontribution allpopups="false" locationuri="popup:org.eclipse.ui.popup.any?after=additions">
to add 'compare > api baseline' menu item.
Comments
Post a Comment