Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Adding icons to standard menu contribution extensions(Can't see how to specify to use a standard icon)
Adding icons to standard menu contribution extensions [message #721497] Thu, 01 September 2011 18:50 Go to next message
SBS  is currently offline SBS
Messages: 57
Registered: January 2011
Member
I am trying to set up a Help menu for my RCP application by using the extension editor. 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?

Thanks,

-sbs
Re: Adding icons to standard menu contribution extensions [message #721558 is a reply to message #721497] Fri, 02 September 2011 01:57 Go to previous message
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
Previous Topic:Extension editor appears to be broken
Next Topic:Is this a bug about setFilter method in TableViewer?
Goto Forum:
  


Current Time: Thu Apr 17 14:36:28 EDT 2014

Powered by FUDForum. Page generated in 0.02422 seconds