org.eclipse.xtext.ui
Class PluginImageHelper

java.lang.Object
  extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.xtext.ui.IImageHelper
IImageHelper.NullImageHelper
 
Constructor Summary
PluginImageHelper()
           
 
Method Summary
 void bundleChanged(org.osgi.framework.BundleEvent event)
          Receives notification that a bundle has had a lifecycle change.
 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
 

Constructor Detail

PluginImageHelper

public PluginImageHelper()
Method Detail

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)
Description copied from interface: org.osgi.framework.BundleListener
Receives notification that a bundle has had a lifecycle change.

Specified by:
bundleChanged in interface org.osgi.framework.BundleListener
Parameters:
event - The BundleEvent.