org.eclipse.cdt.internal.ui.editor
Class CMarkerAnnotation

java.lang.Object
  extended by org.eclipse.jface.text.source.Annotation
      extended by org.eclipse.ui.texteditor.SimpleMarkerAnnotation
          extended by org.eclipse.ui.texteditor.MarkerAnnotation
              extended by org.eclipse.cdt.internal.ui.editor.CMarkerAnnotation
All Implemented Interfaces:
ICAnnotation, IProblemAnnotation

public class CMarkerAnnotation
extends org.eclipse.ui.texteditor.MarkerAnnotation
implements IProblemAnnotation, ICAnnotation


Field Summary
static java.lang.String C_MARKER_TYPE_PREFIX
           
static java.lang.String ERROR_ANNOTATION_TYPE
           
static java.lang.String INFO_ANNOTATION_TYPE
           
static java.lang.String TASK_ANNOTATION_TYPE
           
static java.lang.String WARNING_ANNOTATION_TYPE
           
 
Fields inherited from class org.eclipse.ui.texteditor.MarkerAnnotation
PROBLEM_LAYER
 
Fields inherited from class org.eclipse.jface.text.source.Annotation
TYPE_UNKNOWN
 
Constructor Summary
CMarkerAnnotation(org.eclipse.core.resources.IMarker marker)
           
 
Method Summary
 void addOverlaid(ICAnnotation annotation)
          Adds the given annotation to the list of annotations which are overlaid by this annotations.
 java.lang.String[] getArguments()
           
 int getId()
           
 java.lang.String getMessage()
           
 java.util.Iterator getOverlaidIterator()
          Returns an iterator for iterating over the annotation which are overlaid by this annotation.
 ICAnnotation getOverlay()
          Returns the overlay of this annotation.
 org.eclipse.cdt.core.model.ITranslationUnit getTranslationUnit()
          Returns the compilation unit corresponding to the document on which the annotation is set or null if no corresponding co0mpilationunit exists.
 boolean hasOverlay()
          Returns whether this annotation is overlaid.
 boolean isError()
           
 boolean isProblem()
          Tells whether this annotation is a problem annotation.
 boolean isTemporaryProblem()
           
 boolean isWarning()
           
 void removeOverlaid(ICAnnotation annotation)
          Removes the given annotation from the list of annotations which are overlaid by this annotation.
 void setOverlay(ICAnnotation cAnnotation)
          Overlays this annotation with the given cAnnotation.
 
Methods inherited from class org.eclipse.ui.texteditor.MarkerAnnotation
getLayer, paint, update
 
Methods inherited from class org.eclipse.ui.texteditor.SimpleMarkerAnnotation
equals, getMarker, getText, hashCode
 
Methods inherited from class org.eclipse.jface.text.source.Annotation
getType, isMarkedDeleted, isPersistent, markDeleted, setText, setType
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.cdt.internal.ui.editor.ICAnnotation
getText, getType, isMarkedDeleted, isPersistent
 

Field Detail

C_MARKER_TYPE_PREFIX

public static final java.lang.String C_MARKER_TYPE_PREFIX
See Also:
Constant Field Values

ERROR_ANNOTATION_TYPE

public static final java.lang.String ERROR_ANNOTATION_TYPE
See Also:
Constant Field Values

WARNING_ANNOTATION_TYPE

public static final java.lang.String WARNING_ANNOTATION_TYPE
See Also:
Constant Field Values

INFO_ANNOTATION_TYPE

public static final java.lang.String INFO_ANNOTATION_TYPE
See Also:
Constant Field Values

TASK_ANNOTATION_TYPE

public static final java.lang.String TASK_ANNOTATION_TYPE
See Also:
Constant Field Values
Constructor Detail

CMarkerAnnotation

public CMarkerAnnotation(org.eclipse.core.resources.IMarker marker)
Method Detail

getMessage

public java.lang.String getMessage()
Specified by:
getMessage in interface IProblemAnnotation
See Also:
IProblemAnnotation.getMessage()

isError

public boolean isError()
Specified by:
isError in interface IProblemAnnotation
See Also:
IProblemAnnotation.isError()

isWarning

public boolean isWarning()
Specified by:
isWarning in interface IProblemAnnotation
See Also:
IProblemAnnotation.isWarning()

isTemporaryProblem

public boolean isTemporaryProblem()
Specified by:
isTemporaryProblem in interface IProblemAnnotation
See Also:
IProblemAnnotation.isTemporaryProblem()

getArguments

public java.lang.String[] getArguments()
Specified by:
getArguments in interface ICAnnotation
Specified by:
getArguments in interface IProblemAnnotation
See Also:
IProblemAnnotation.getArguments()

getId

public int getId()
Specified by:
getId in interface ICAnnotation
Specified by:
getId in interface IProblemAnnotation
See Also:
IProblemAnnotation.getId()

isProblem

public boolean isProblem()
Description copied from interface: ICAnnotation
Tells whether this annotation is a problem annotation.

Specified by:
isProblem in interface ICAnnotation
Specified by:
isProblem in interface IProblemAnnotation
Returns:
true if it is a problem annotation

setOverlay

public void setOverlay(ICAnnotation cAnnotation)
Overlays this annotation with the given cAnnotation.

Parameters:
cAnnotation - annotation that is overlaid by this annotation

hasOverlay

public boolean hasOverlay()
Description copied from interface: ICAnnotation
Returns whether this annotation is overlaid.

Specified by:
hasOverlay in interface ICAnnotation
Returns:
true if overlaid

getOverlay

public ICAnnotation getOverlay()
Description copied from interface: ICAnnotation
Returns the overlay of this annotation.

Specified by:
getOverlay in interface ICAnnotation
Returns:
the annotation's overlay

addOverlaid

public void addOverlaid(ICAnnotation annotation)
Description copied from interface: ICAnnotation
Adds the given annotation to the list of annotations which are overlaid by this annotations.

Specified by:
addOverlaid in interface ICAnnotation
Parameters:
annotation - the problem annoation

removeOverlaid

public void removeOverlaid(ICAnnotation annotation)
Description copied from interface: ICAnnotation
Removes the given annotation from the list of annotations which are overlaid by this annotation.

Specified by:
removeOverlaid in interface ICAnnotation
Parameters:
annotation - the problem annoation

getOverlaidIterator

public java.util.Iterator getOverlaidIterator()
Description copied from interface: ICAnnotation
Returns an iterator for iterating over the annotation which are overlaid by this annotation.

Specified by:
getOverlaidIterator in interface ICAnnotation
Returns:
an iterator over the overlaid annotaions

getTranslationUnit

public org.eclipse.cdt.core.model.ITranslationUnit getTranslationUnit()
Description copied from interface: ICAnnotation
Returns the compilation unit corresponding to the document on which the annotation is set or null if no corresponding co0mpilationunit exists.

Specified by:
getTranslationUnit in interface ICAnnotation