Loading IMAGES into a "fragment" project [message #48936] |
Wed, 12 March 2003 18:42  |
Eclipse User |
|
|
|
Originally posted by: notvalid.hotmail.com
Hi,
I am unsure of how to get images to load in to my fragment project. I
used to use a method that would create a "plugin" instance and with it get
the resource information to create a URL, which I could create an image
from.
But, now that I'm creating a "fragment" and not a "plugin", I can't
instantiate a plugin to get my workspace URL info.
There must be a simple way to access the images in my "icons" directory,
without requiring all these methods. One would think it would be one
line...
thanks for the help
|
|
|
|
Re: Loading IMAGES into a "fragment" project [message #49108 is a reply to message #48936] |
Thu, 13 March 2003 11:01  |
Eclipse User |
|
|
|
Originally posted by: jeff_mcaffer_REMOVE.ca.ibm.com
You have two choices,
1) use resource loading. This means you need to declare a <library> entry
in your fragment.xml to add the icons dir onto the classpath and then use a
dir structure that mirrors some package structure
2) use Plugin.find() to do the trick. As Peter pointed out, fragments just
add content to a plugin and are seamlessly merged into the base plugin of
the fragment.
Jeff
"Walrus" <notvalid@hotmail.com> wrote in message
news:b4ogo9$ih7$1@rogue.oti.com...
> Hi,
> I am unsure of how to get images to load in to my fragment project. I
> used to use a method that would create a "plugin" instance and with it get
> the resource information to create a URL, which I could create an image
> from.
> But, now that I'm creating a "fragment" and not a "plugin", I can't
> instantiate a plugin to get my workspace URL info.
>
> There must be a simple way to access the images in my "icons" directory,
> without requiring all these methods. One would think it would be one
> line...
>
> thanks for the help
>
>
>
>
>
|
|
|
Re: Loading IMAGES into a "fragment" project [message #591591 is a reply to message #48936] |
Wed, 12 March 2003 19:09  |
Eclipse User |
|
|
|
This should be asked on the eclipse.tools newsgroup for more eyes on it.
However I am unsure what you mean loading a fragment and not having
access to the plugin. A fragment is part of a plugin. Fragments only
exist with plugins.
What reason are you using the fragment for?
Peter
Walrus wrote:
> Hi,
> I am unsure of how to get images to load in to my fragment project. I
> used to use a method that would create a "plugin" instance and with it get
> the resource information to create a URL, which I could create an image
> from.
> But, now that I'm creating a "fragment" and not a "plugin", I can't
> instantiate a plugin to get my workspace URL info.
>
> There must be a simple way to access the images in my "icons" directory,
> without requiring all these methods. One would think it would be one
> line...
>
> thanks for the help
>
>
>
>
>
|
|
|
Re: Loading IMAGES into a "fragment" project [message #591617 is a reply to message #48936] |
Thu, 13 March 2003 11:01  |
Eclipse User |
|
|
|
You have two choices,
1) use resource loading. This means you need to declare a <library> entry
in your fragment.xml to add the icons dir onto the classpath and then use a
dir structure that mirrors some package structure
2) use Plugin.find() to do the trick. As Peter pointed out, fragments just
add content to a plugin and are seamlessly merged into the base plugin of
the fragment.
Jeff
"Walrus" <notvalid@hotmail.com> wrote in message
news:b4ogo9$ih7$1@rogue.oti.com...
> Hi,
> I am unsure of how to get images to load in to my fragment project. I
> used to use a method that would create a "plugin" instance and with it get
> the resource information to create a URL, which I could create an image
> from.
> But, now that I'm creating a "fragment" and not a "plugin", I can't
> instantiate a plugin to get my workspace URL info.
>
> There must be a simple way to access the images in my "icons" directory,
> without requiring all these methods. One would think it would be one
> line...
>
> thanks for the help
>
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.07885 seconds