|
Re: Adding icons to standard menu contribution extensions [message #721558 is a reply to message #721497] |
Fri, 02 September 2011 05:57 |
Eclipse User |
|
|
|
Originally posted by:
On 2011-09-02 00:50, SBS wrote:
> I am trying to set up a Help menu for my RCP application by using the
> extension editor.
I'm not sure what you mean by the "extension editor", could you
elaborate? Are you adding them programmatically via
ActionFactory.HELP_CONTENTS.create() or are you trying to adding them
via the org.eclipse.ui.menus extension point?
> I have no problem adding the standard Help menu items
> such as org.eclipse.ui.help.helpContents but I can't see how to give
> them the correct icon. I would have expected that by specifying a
> built-in command id that I would automatically get the corresponding
> standard icon but I get no icon instead. Also, the icon field Browse
> button only lets me select an icon that's part of my plug-in.
>
> How can I specify these standard menu items to have the corresponding
> standard icons?
As of Eclipse 3.6.1 only the command is defined for them, as in the
org.eclipse.ui bundle:
<command
name="%command.helpContents.name"
description="%command.helpContents.description"
categoryId="org.eclipse.ui.category.help"
id="org.eclipse.ui.help.helpContents" />
As you see, no images are defined. Currently there exists a bug entry,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=270007
which points to the problem, that you currently need to override
ActionBarAdvisor#makeActions and need to create and register these actions:
@Override
protected void makeActions(IWorkbenchWindow window) {
register(ActionFactory.RESET_PERSPECTIVE.create(window));
register(ActionFactory.HELP_CONTENTS.create(window));
register(ActionFactory.HELP_SEARCH.create(window));
register(ActionFactory.DYNAMIC_HELP.create(window));
}
such that they can be referred to in the org.eclipse.ui.menus extension
point.
HTH & Greetings from Bremen,
- Daniel Krügler
|
|
|
Powered by
FUDForum. Page generated in 0.03624 seconds