Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Loading IMAGES into a "fragment" project
Loading IMAGES into a "fragment" project [message #48936] Wed, 12 March 2003 23:42 Go to next message
Eclipse UserFriend
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 #48999 is a reply to message #48936] Thu, 13 March 2003 00:09 Go to previous messageGo to next message
Peter Manahan is currently offline Peter ManahanFriend
Messages: 131
Registered: July 2009
Senior Member
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 #49108 is a reply to message #48936] Thu, 13 March 2003 16:01 Go to previous message
Eclipse UserFriend
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] Thu, 13 March 2003 00:09 Go to previous message
Peter Manahan is currently offline Peter ManahanFriend
Messages: 131
Registered: July 2009
Senior Member
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 16:01 Go to previous message
Jeff McAffer is currently offline Jeff McAfferFriend
Messages: 104
Registered: July 2009
Senior Member
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
>
>
>
>
>
Previous Topic:[jface] TableViewer and ContentProvider...
Next Topic:Newbie: how te set up a minimal build
Goto Forum:
  


Current Time: Thu Apr 25 11:31:48 GMT 2024

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

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

Back to the top