org.eclipse.xtext.ui
Class PluginImageHelper
java.lang.Object
org.eclipse.xtext.ui.PluginImageHelper
- All Implemented Interfaces:
- java.util.EventListener, IImageHelper, org.osgi.framework.BundleListener, org.osgi.framework.SynchronousBundleListener
public class PluginImageHelper
- extends java.lang.Object
- implements IImageHelper, org.osgi.framework.SynchronousBundleListener
- Author:
- Sebastian Zarnekow
Method Summary |
void |
bundleChanged(org.osgi.framework.BundleEvent event)
|
void |
dispose()
Disposes all images managed by this image helper. |
java.lang.String |
getDefaultImage()
|
org.eclipse.swt.graphics.Image |
getImage(org.eclipse.jface.resource.ImageDescriptor descriptor)
Returns the image associated with the given image descriptor. |
org.eclipse.swt.graphics.Image |
getImage(java.lang.String imageName)
|
java.lang.String |
getNotFound()
|
java.lang.String |
getPathSuffix()
|
org.eclipse.ui.plugin.AbstractUIPlugin |
getPlugin()
|
void |
hookBundleListener(org.eclipse.ui.plugin.AbstractUIPlugin plugin)
|
void |
setDefaultImage(java.lang.String defaultImage)
|
void |
setNotFound(java.lang.String notFound)
|
void |
setPathSuffix(java.lang.String pathSuffix)
|
void |
setPlugin(org.eclipse.ui.plugin.AbstractUIPlugin plugin)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PluginImageHelper
public PluginImageHelper()
getImage
public org.eclipse.swt.graphics.Image getImage(org.eclipse.jface.resource.ImageDescriptor descriptor)
- Returns the image associated with the given image descriptor.
- Specified by:
getImage
in interface IImageHelper
- Parameters:
descriptor
- the image descriptor for which the helper manages an image, or null
for a missing image
descriptor
- Returns:
- the image associated with the image descriptor or
null
if the image descriptor can't create
the requested image.
dispose
public void dispose()
- Disposes all images managed by this image helper.
hookBundleListener
@Inject
public void hookBundleListener(org.eclipse.ui.plugin.AbstractUIPlugin plugin)
getImage
public org.eclipse.swt.graphics.Image getImage(java.lang.String imageName)
- Specified by:
getImage
in interface IImageHelper
setPathSuffix
public void setPathSuffix(java.lang.String pathSuffix)
getPathSuffix
public java.lang.String getPathSuffix()
setPlugin
public void setPlugin(org.eclipse.ui.plugin.AbstractUIPlugin plugin)
getPlugin
public org.eclipse.ui.plugin.AbstractUIPlugin getPlugin()
setNotFound
public void setNotFound(java.lang.String notFound)
getNotFound
public java.lang.String getNotFound()
getDefaultImage
public java.lang.String getDefaultImage()
setDefaultImage
public void setDefaultImage(java.lang.String defaultImage)
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event)
- Specified by:
bundleChanged
in interface org.osgi.framework.BundleListener