Skip to main content


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 22:50 Go to next message
SBS  is currently offline SBS Friend
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 05:57 Go to previous message
Eclipse UserFriend
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: Wed Apr 24 21:26:13 GMT 2024

Powered by FUDForum. Page generated in 0.03624 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top