Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to link to icons in the JAR
How to link to icons in the JAR [message #115293] Sat, 23 August 2003 04:03 Go to next message
Eclipse UserFriend
Originally posted by: MZ.whitehouse.gov

I am developing the plugin and I would like to include icons for it into
the its JAR archive. Is it possible to link from plugin to icons, included
into the JAR?

Thanks
Re: How to link to icons in the JAR [message #115405 is a reply to message #115293] Sat, 23 August 2003 10:22 Go to previous messageGo to next message
Eclipse UserFriend
no

"MZ" <MZ@whitehouse.gov> wrote in message news:bi774v$rgu$1@eclipse.org...
> I am developing the plugin and I would like to include icons for it into
> the its JAR archive. Is it possible to link from plugin to icons, included
> into the JAR?
>
> Thanks
>
Re: How to link to icons in the JAR [message #116073 is a reply to message #115293] Mon, 25 August 2003 11:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

What do you mean? Do you mean the icons are already in the jar (a
<library> from the plugin.xml) and you want to access them from the
plugin.xml file (e.g. editor icon). Then no. But if you want to access
them from your code, then yes. Just access them in a normal way. Use the
standard getResource() from the class or classloader of your class in
the plugin.

Rich
Re: How to link to icons in the JAR [message #116370 is a reply to message #116073] Mon, 25 August 2003 13:50 Go to previous messageGo to next message
Eclipse UserFriend
Your plugin icons are not meant to be in the jar, because eclipse
wants to "lazily load" your plugin. In other words, during loading
of the platform, it only reads the plugin.xml file and shows the
icons you declare there. When your plugin is really needed, the
jar is opened and your plugin is activated (which requires memory
and CPU cycles). Images in your jar can then be ued by your
plugin code, of course, but the platform will never look inside
the jar for icons. Too expensive.

Chris Laffra

"Richard L. Kulp" <richkulp@NOSPAM.us.ibm.com> wrote in message
news:bid92q$ta8$1@eclipse.org...
> What do you mean? Do you mean the icons are already in the jar (a
> <library> from the plugin.xml) and you want to access them from the
> plugin.xml file (e.g. editor icon). Then no. But if you want to access
> them from your code, then yes. Just access them in a normal way. Use the
> standard getResource() from the class or classloader of your class in
> the plugin.
>
> Rich
>
Re: How to link to icons in the JAR [message #116391 is a reply to message #116370] Mon, 25 August 2003 14:36 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NOSPAM.us.ibm.com

Exactly. If he is asking about access from the plugin.xml, then they
can't be in the jar. If he is asking about from code only, then they can
be in the jar.

Rich
Previous Topic:help me,thank you very much
Next Topic:ComboFieldEditor
Goto Forum:
  


Current Time: Sun Jun 08 04:36:57 EDT 2025

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

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

Back to the top