org.eclipse.xtext.ui.editor.validation
Class XtextAnnotation

java.lang.Object
  extended by org.eclipse.jface.text.source.Annotation
      extended by org.eclipse.xtext.ui.editor.validation.XtextAnnotation
All Implemented Interfaces:
org.eclipse.jface.text.source.IAnnotationPresentation

public class XtextAnnotation
extends org.eclipse.jface.text.source.Annotation
implements org.eclipse.jface.text.source.IAnnotationPresentation

Author:
Heiko Behrens - Initial contribution and API

Field Summary
 
Fields inherited from class org.eclipse.jface.text.source.Annotation
TYPE_UNKNOWN
 
Fields inherited from interface org.eclipse.jface.text.source.IAnnotationPresentation
DEFAULT_LAYER
 
Constructor Summary
XtextAnnotation(java.lang.String type, boolean isPersistent, IXtextDocument document, Issue issue, boolean isQuickfixable)
           
 
Method Summary
 IXtextDocument getDocument()
           
 Issue getIssue()
           
 java.lang.String getIssueCode()
           
 java.lang.String[] getIssueData()
           
 int getLayer()
          Returns the annotations drawing layer.
 org.eclipse.emf.common.util.URI getUriToProblem()
           
 boolean isQuickFixable()
           
 void paint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.widgets.Canvas canvas, org.eclipse.swt.graphics.Rectangle bounds)
          Implement this method to draw a graphical representation of this annotation within the given bounds.
 
Methods inherited from class org.eclipse.jface.text.source.Annotation
getText, getType, isMarkedDeleted, isPersistent, markDeleted, setText, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XtextAnnotation

public XtextAnnotation(java.lang.String type,
                       boolean isPersistent,
                       IXtextDocument document,
                       Issue issue,
                       boolean isQuickfixable)
Method Detail

getIssueCode

public java.lang.String getIssueCode()

getIssueData

public java.lang.String[] getIssueData()

getDocument

public IXtextDocument getDocument()

getUriToProblem

public org.eclipse.emf.common.util.URI getUriToProblem()

getIssue

public Issue getIssue()

isQuickFixable

public boolean isQuickFixable()

getLayer

public int getLayer()
Description copied from interface: org.eclipse.jface.text.source.IAnnotationPresentation
Returns the annotations drawing layer.

Specified by:
getLayer in interface org.eclipse.jface.text.source.IAnnotationPresentation
Returns:
the annotations drawing layer

paint

public void paint(org.eclipse.swt.graphics.GC gc,
                  org.eclipse.swt.widgets.Canvas canvas,
                  org.eclipse.swt.graphics.Rectangle bounds)
Description copied from interface: org.eclipse.jface.text.source.IAnnotationPresentation
Implement this method to draw a graphical representation of this annotation within the given bounds.

Note that this method is not used when drawing annotations on the editor's text widget. This is handled trough a AnnotationPainter.IDrawingStrategy.

Specified by:
paint in interface org.eclipse.jface.text.source.IAnnotationPresentation
Parameters:
gc - the drawing GC
canvas - the canvas to draw on
bounds - the bounds inside the canvas to draw on