public interface IAnnotationAccessExtension
IAnnotationAccess
.
This interface replaces the methods of IAnnotationAccess
.
This interface provides
IAnnotationAccess
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_LAYER
The default annotation layer.
|
Modifier and Type | Method and Description |
---|---|
int |
getLayer(Annotation annotation)
Returns the layer for given annotation.
|
Object[] |
getSupertypes(Object annotationType)
Returns the list of super types for the given annotation type.
|
String |
getTypeLabel(Annotation annotation)
Returns the label for the given annotation's type.
|
boolean |
isPaintable(Annotation annotation)
Returns
true if painting annotation will produce something
meaningful, false if not. |
boolean |
isSubtype(Object annotationType,
Object potentialSupertype)
Returns
true if the given annotation is of the given type
or false otherwise. |
void |
paint(Annotation annotation,
GC gc,
Canvas canvas,
Rectangle bounds)
Draws a graphical representation of the given annotation within the given bounds.
|
static final int DEFAULT_LAYER
String getTypeLabel(Annotation annotation)
annotation
- the annotationnull
if no such label existsint getLayer(Annotation annotation)
annotation
- the annotationvoid paint(Annotation annotation, GC gc, Canvas canvas, Rectangle bounds)
Note that this method is not used when drawing annotations on the editor's
text widget. This is handled trough a AnnotationPainter.IDrawingStrategy
.
annotation
- the given annotationgc
- the drawing GCcanvas
- the canvas to draw onbounds
- the bounds inside the canvas to draw onboolean isPaintable(Annotation annotation)
true
if painting annotation
will produce something
meaningful, false
if not. E.g. if no image is available.
Note that this method is not used when drawing annotations on the editor's
text widget. This is handled trough a AnnotationPainter.IDrawingStrategy
.
annotation
- the annotation to check whether it can be paintedtrue
if painting annotation
will succeedboolean isSubtype(Object annotationType, Object potentialSupertype)
true
if the given annotation is of the given type
or false
otherwise.annotationType
- the annotation typepotentialSupertype
- the potential super annotation typetrue
if annotation type is a sub-type of the potential annotation super typeObject[] getSupertypes(Object annotationType)
annotationType
- the annotation type to check
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.