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.
Paul Webster Messages: 6859 Registered: July 2009 Location: Ottawa
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/plugin.id/path/to/icon.gif pattern to load images from other plugins.