org.eclipse.xtext.ui.editor.model
Class XtextMarkerAnnotationImageProvider

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.model.XtextMarkerAnnotationImageProvider
All Implemented Interfaces:
org.eclipse.ui.texteditor.IAnnotationImageProvider

public class XtextMarkerAnnotationImageProvider
extends java.lang.Object
implements org.eclipse.ui.texteditor.IAnnotationImageProvider

Author:
Michael Clay - Initial contribution and API, Heiko Behrens

Constructor Summary
XtextMarkerAnnotationImageProvider()
           
 
Method Summary
 org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String imageDescritporId)
          Returns the image descriptor for the given symbolic name.
 java.lang.String getImageDescriptorId(org.eclipse.jface.text.source.Annotation annotation)
          Returns the image descriptor id of the image for the given annotation.
 org.eclipse.swt.graphics.Image getManagedImage(org.eclipse.jface.text.source.Annotation annotation)
          Returns the image for the given annotation or null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XtextMarkerAnnotationImageProvider

public XtextMarkerAnnotationImageProvider()
Method Detail

getImageDescriptor

public org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String imageDescritporId)
Description copied from interface: org.eclipse.ui.texteditor.IAnnotationImageProvider
Returns the image descriptor for the given symbolic name.

Specified by:
getImageDescriptor in interface org.eclipse.ui.texteditor.IAnnotationImageProvider
Parameters:
imageDescritporId - the image descriptor id
Returns:
the image descriptor

getImageDescriptorId

public java.lang.String getImageDescriptorId(org.eclipse.jface.text.source.Annotation annotation)
Description copied from interface: org.eclipse.ui.texteditor.IAnnotationImageProvider
Returns the image descriptor id of the image for the given annotation.

Specified by:
getImageDescriptorId in interface org.eclipse.ui.texteditor.IAnnotationImageProvider
Parameters:
annotation - the annotation
Returns:
the image descriptor id

getManagedImage

public org.eclipse.swt.graphics.Image getManagedImage(org.eclipse.jface.text.source.Annotation annotation)
Description copied from interface: org.eclipse.ui.texteditor.IAnnotationImageProvider
Returns the image for the given annotation or null. The returned image is managed by this annotation image provided. If the annotation image provider does not support managed images, clients have to manage the annotation images. For that, clients first ask for the image descriptor id for a given annotation (getImageDescriptorId(Annotation)) as then for the image descriptor. The image descriptor id should be used to manage the annotation images using an ImageRegistry.

Specified by:
getManagedImage in interface org.eclipse.ui.texteditor.IAnnotationImageProvider
Parameters:
annotation - the annotation
Returns:
the managed image