Update August 2012, as commented by reprogrammer, org.eclipse.ui.actionSets
is deprecated:
Instead, use the extension point org.eclipse.ui.commands
.
Original answer (August 2011)
The actionSet (extension point="org.eclipse.ui.actionSets"
) with an action on 'menubarPath="org.eclipse.search.menu/dialogGroup"
' recommended by Manuel Selva is the official solution, in line with general menu contribution.
But beware of some issue that might still lingering for Search menu contribution, as illustrated by this thread around the (supposedly fixed) bug 15684:
(it was in 2009, hopefully the issue has been addressed since)
What actually does work is redefining the whole Search Menu as in the workaround that is still currently used in JDT 3.6:
<extension
point="org.eclipse.ui.actionSets">
<actionSet
label="%JavaSearchActionSet.label"
description="%JavaSearchActionSet.description"
visible="false"
id="org.eclipse.jdt.ui.SearchActionSet">
<!-- see http://bugs.eclipse.org/bugs/show_bug.cgi?id=15684 -->
<!-- Note: The menu (re-) definition has to be here due to bug: -->
<!-- =================================================================== -->
<!-- Search Menu -->
<!-- =================================================================== -->
<menu
label="%searchMenu.label"
path="navigate"
id="org.eclipse.search.menu">
<groupMarker name="internalDialogGroup"/> <!-- not to be used by clients -->
<groupMarker name="dialogGroup"/> <!-- to be used by clients -->
<separator name="fileSearchContextMenuActionsGroup"/> <!-- to be used by clients -->
<separator name="contextMenuActionsGroup"/> <!-- to be used by clients -->
<separator name="occurencesActionsGroup"/> <!-- to be used by clients -->
<separator name="extraSearchGroup"/> <!-- to be used by clients -->
</menu>
<!-- (...) -->