Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Icons in separate bundle
Icons in separate bundle [message #655011] Thu, 17 February 2011 23:45 Go to next message
Mauro Condarelli is currently offline Mauro Condarelli
Messages: 424
Registered: September 2009
Senior Member
I would like to collect all icons I use in a single bundle, probably
together with some simple class to retrieve and resize them.
Rationale is this way I can change the whole icon-set simply switching
one plugin.
Is this possible at all?
It seems to me when I set some icon declaratively in plugin.zml, e.g.:
<command
commandId="it.condarelli.writer.commands.open"
icon="icons/32/Open.png"
label="&amp;Open"
style="push">
</command>
I can only reference a path in the current bundle; is this correct?
Is there some workaround?
What is the recommended way to change the whole icon-set?
Should I override each and all icons progrmmatically?

Thanks in Advance
Mauro
Re: Icons in separate bundle [message #655042 is a reply to message #655011] Fri, 18 February 2011 07:13 Go to previous messageGo to next message
Adam Lucarz is currently offline Adam Lucarz
Messages: 518
Registered: July 2009
Senior Member
You can use " platform:/plugin/${plugin_id}/${relative_path_within_plugin} " in the plugin.xml to reference icons in another plug-ins.
Re: Icons in separate bundle [message #655139 is a reply to message #655011] Fri, 18 February 2011 13:26 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

If you are working with commands, you can provide images for them using
org.eclipse.ui.commandImages. In that case, the commandImages
definitions could be in the separate plugin, and so swapping that plugin
would provide new images to all the commands.

The other option is as mentioned, use
platform:/plugin/a.plugin.id/icon_path/icon.png

Then you would have to replace them in your a.plugin.id plugin, as you
can't simply swap in a different plugin.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Eclipse RCP: Using property tester with menu
Next Topic:Property testers Versus Source Providers
Goto Forum:
  


Current Time: Fri Oct 31 09:11:41 GMT 2014

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

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