public interface IAnnotationModelExtension
IAnnotationModel
with the
ability piggyback other annotation models. It also introduces the concept of
modification time stamps and adds methods for richer manipulation methods.Modifier and Type | Method and Description |
---|---|
void |
addAnnotationModel(Object key,
IAnnotationModel attachment)
Attaches
attachment to the receiver. |
IAnnotationModel |
getAnnotationModel(Object key)
Returns the attached
IAnnotationModel for key ,
or null if none is attached for key . |
Object |
getModificationStamp()
Returns the modification stamp of this annotation model.
|
void |
modifyAnnotationPosition(Annotation annotation,
Position position)
Modifies the position associated with the given annotation to equal the
given position.
|
void |
removeAllAnnotations()
Removes all annotations from this annotation model.
|
IAnnotationModel |
removeAnnotationModel(Object key)
Removes and returns the attached
IAnnotationModel for
key . |
void |
replaceAnnotations(Annotation[] annotationsToRemove,
Map annotationsToAdd)
Adds and removes annotations to/from this annotation model in a single
step.
|
void addAnnotationModel(Object key, IAnnotationModel attachment)
attachment
to the receiver. Connects
attachment
to the currently connected document. If
attachment
is already attached (even) under a different
key), it is not attached again.key
- the key through which the attachment is identified.attachment
- the attached IAnnotationModel
IAnnotationModel getAnnotationModel(Object key)
IAnnotationModel
for key
,
or null
if none is attached for key
.key
- the key through which the attachment is identified.IAnnotationModel
attached under
key
, or null
IAnnotationModel removeAnnotationModel(Object key)
IAnnotationModel
for
key
.key
- the key through which the attachment is identified.IAnnotationModel
attached under
key
, or null
void replaceAnnotations(Annotation[] annotationsToRemove, Map annotationsToAdd) throws ClassCastException
annotationsToRemove
- the annotations to be removed, may be
null
annotationsToAdd
- the annotations which will be added, may be
null
each map entry has an
Annotation
as key and a Position
as valueClassCastException
- if one of the map key or values has a wrong
typevoid modifyAnnotationPosition(Annotation annotation, Position position)
null
the annotation is removed from the model. All
annotation model change listeners will be informed about the change.annotation
- the annotation whose associated position should be
modifiedposition
- the position to whose values the associated position
should be changedvoid removeAllAnnotations()
Object getModificationStamp()
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.