Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » External Image Management in RCP
External Image Management in RCP [message #902987] Tue, 21 August 2012 14:25 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member

I am working with an RCP app uing GEF library. I have couple of hundreds of images and i have multiple plugins. I want to create one plugin for image management and that will share all images amongst rest of plugins something like ISharedImages concept.

what is the best practise in that regard.

Re: External Image Management in RCP [message #903481 is a reply to message #902987] Thu, 23 August 2012 19:35 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

If a UI plugin activator subclasses AbstractUIPlugin, you have a couple of options.

1) use org.eclipse.ui.plugin.AbstractUIPlugin.getImageRegistry() and load it up with image descriptors in org.eclipse.ui.plugin.AbstractUIPlugin.initializeImageRegistry(ImageRegistry). Then have all of your bundles retrieve that bundle's image registry and get Images and ImageDescriptors from it.

2) use org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin(String, String) from your bundles to get ImageDescriptors from a central plugin. Then classes in your plugins have to create Images out of them, preferrably using a local resource manager org.eclipse.jface.resource.LocalResourceManager

For centrally located images that are used in extensions, you can use the platform:/plugin/ pattern to load images from other plugins.


Previous Topic:Run Time Error - The Proxied handler for filename could not be loaded
Next Topic:config.ini, Exception launching the Eclipse Platform
Goto Forum:

Current Time: Mon Mar 04 06:11:04 GMT 2024

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

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

Back to the top