Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » ImageRegistry and Resource Management
ImageRegistry and Resource Management [message #87238] Wed, 02 July 2003 09:01 Go to next message
Eclipse UserFriend
Hi there,

The purpose of the ImageRegistry in the plugin is to maintain a list of
ImageDescriptors. The documentation implies that it takes care of
"creating, managing and disposing these images directly".

However, as near as I can tell, you still have to create the Images
manually from these descriptors.

And do you actually have to manually dispose of each image you create as
well? For example, if I call
Item.setImage(imageDescriptor.createImage()) - I have to dispose of that
image - and I can't do it by overriding dispose(), I have to set up a
listener in my Item object to listen for the DISPOSE event?

Is that correct, or does JFace indeed take care of a lot of this for me?

Thanks,
Andy
Re: ImageRegistry and Resource Management [message #88602 is a reply to message #87238] Thu, 03 July 2003 18:04 Go to previous message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

If you use ImageRegistry.get(String), it will create and manage the
image for you. Generally, there is no easy solution for image sharing.
In many cases you will have to take care of disposing the image
yourself. See the Image article on eclipse.org for more details:

http://www.eclipse.org/articles/Article-Using%20Images%20In% 20Eclipse/Using%20Images%20In%20Eclipse.html
--

Andy Yang wrote:
> Hi there,
>
> The purpose of the ImageRegistry in the plugin is to maintain a list of
> ImageDescriptors. The documentation implies that it takes care of
> "creating, managing and disposing these images directly".
>
> However, as near as I can tell, you still have to create the Images
> manually from these descriptors.
>
> And do you actually have to manually dispose of each image you create as
> well? For example, if I call
> Item.setImage(imageDescriptor.createImage()) - I have to dispose of that
> image - and I can't do it by overriding dispose(), I have to set up a
> listener in my Item object to listen for the DISPOSE event?
>
> Is that correct, or does JFace indeed take care of a lot of this for me?
>
> Thanks,
> Andy
>
Previous Topic:integrate own plugin
Next Topic:file.exists() problem
Goto Forum:
  


Current Time: Sun Aug 31 18:53:07 EDT 2025

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

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

Back to the top