|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Extends IAnnotationModelwith the
ability piggyback other annotation models. It also introduces the concept of
modification time stamps and adds methods for richer manipulation methods.
| Method Summary | |
|---|---|
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. |
| Method Detail |
public 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 IAnnotationModelpublic 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 nullpublic IAnnotationModel removeAnnotationModel(Object key)
IAnnotationModel for
key.
key - the key through which the attachment is identified.
IAnnotationModel attached under
key, or null
public void replaceAnnotations(Annotation[] annotationsToRemove,
Map annotationsToAdd)
throws ClassCastException
annotationsToRemove - the annotations to be removed, may be
nullannotationsToAdd - the annotations which will be added, may be
null each map entry has an
Annotation as key and a Position
as value
ClassCastException - if one of the map key or values has a wrong
type
public void 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 changedpublic void removeAllAnnotations()
public Object getModificationStamp()
|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.