Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Icon Sharing between plugins(I want a central plugin to hold my standard icons)
Icon Sharing between plugins [message #527355] Thu, 15 April 2010 00:08 Go to next message
dwain Missing name is currently offline dwain Missing nameFriend
Messages: 35
Registered: October 2009
Member
Hello there, my team is building an RCP application. We have a standard common plugin that has our common libraries and classes that all of our other plugins use. I would like to keep commonly used icons, for example the delete icon, in this common plugin.

This is not very difficult to do with a programmatic approach. However, I am having trouble using these icons through the plugin.xml when I export the jar files. Right now I manually put in the full path of the icon, and that works great when I run the program straight out of eclipse. I see the problem when I export the application and run it from the jar files. There are several icons that do not show up anymore, that did show up when running from eclipse.

So I am assuming that I am doing something wrong. Can this be done in this manner? Is there a better solution that I am not thinking about? I would really like to have the standard icons in one place, that makes it so much easier if you need to change one. Well thank you for taking a look at this,

Dwain
Re: Icon Sharing between plugins [message #527371 is a reply to message #527355] Thu, 15 April 2010 05:44 Go to previous message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
On 15.04.2010 02:08, dwain wrote:
> Hello there, my team is building an RCP application. We have a standard
> common plugin that has our common libraries and classes that all of our
> other plugins use. I would like to keep commonly used icons, for example
> the delete icon, in this common plugin.
> This is not very difficult to do with a programmatic approach. However,
> I am having trouble using these icons through the plugin.xml when I
> export the jar files. Right now I manually put in the full path of the
> icon, and that works great when I run the program straight out of
> eclipse. I see the problem when I export the application and run it from
> the jar files. There are several icons that do not show up anymore, that
> did show up when running from eclipse.
> So I am assuming that I am doing something wrong. Can this be done in
> this manner?

There exists already a standard way to refer to the resources of other
plugins. Just use the notation:

platform:/plugin/${plugin_id}/${relative_path_within_plugin}

One example is:

platform:/plugin/org.eclipse.ui/icons/full/obj16/delete_obj. gif

HTH & Greetings from Bremen,

Daniel Krügler
Previous Topic:How to show a job's progress within a wizard
Next Topic:Widgets inside a view
Goto Forum:
  


Current Time: Tue Apr 23 14:55:57 GMT 2024

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

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

Back to the top