It is possible to create a menu item in eclipse with an icon and a text? Normally all menu items on the main menu are displayed with an icon only. I need, ho开发者_StackOverflow中文版wever, to display a short text next to the icon.
E.g. in the attached screenshot the "R2" short text next to the "run" icon (I don't want to enhance the "run" menu, this is just an example).
For a command contributed through org.eclipse.ui.menus
you can add the mode attribute. See the Extension Point Description (you can get to that from the PDE Editor>Extensions tab).
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="toolbar:org.eclipse.ui.workbench.file">
<command commandId="org.eclipse.ui.edit.copy"
mode="FORCE_TEXT"/>
</menuContribution>
</extension>
精彩评论