|
Re: External Image Management in RCP [message #903481 is a reply to message #902987] |
Thu, 23 August 2012 19:35 |
|
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.
PW
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
Powered by
FUDForum. Page generated in 0.04957 seconds