|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines the model component for a vertical ruler. It maintains a set of annotations and notifies registered annotation model listeners about annotation model changes. It also provides methods for inquerying the current offset and length of an annotation managed by this model.
Clients may implement this interface or use the default implementation provided
by AnnotationModel
.
IVerticalRuler
,
Annotation
,
IAnnotationModelListener
Method Summary | |
void |
addAnnotation(Annotation annotation,
Position position)
Adds a annotation to this annotation model. |
void |
addAnnotationModelListener(IAnnotationModelListener listener)
Registers the annotation model listener with this annotation model. |
void |
connect(IDocument document)
Connects the annotation model to a document. |
void |
disconnect(IDocument document)
Disconnects this model from a document. |
Iterator |
getAnnotationIterator()
Returns all annotations managed by this model. |
Position |
getPosition(Annotation annotation)
Returns the position associated with the given annotation. |
void |
removeAnnotation(Annotation annotation)
Removes the given annotation from the model. |
void |
removeAnnotationModelListener(IAnnotationModelListener listener)
Removes the listener from the model's list of annotation model listeners. |
Method Detail |
public void addAnnotationModelListener(IAnnotationModelListener listener)
listener
- the listener to be registered, may not be null
public void removeAnnotationModelListener(IAnnotationModelListener listener)
listener
- the listener to be removed, may not be null
public void connect(IDocument document)
connect
calls must mention the document the
model is already connected to. An annotation model primarily uses
connect
and disconnect
for reference counting
the document. Reference counting frees the clients from keeping tracker
whether a model has already been connected to a document.
document
- the document the model gets connected to,
may not be null
disconnect(org.eclipse.jface.text.IDocument)
public void disconnect(IDocument document)
document
- the document the model gets disconnected from,
may not be null
for further specification details
public void addAnnotation(Annotation annotation, Position position)
annotation
- the annotation to add, may not be null
position
- the position describing the range covered by this annotation,
may not be null
public void removeAnnotation(Annotation annotation)
annotation
- the annotation to be removed from this model,
may not be null
public Iterator getAnnotationIterator()
public Position getPosition(Annotation annotation)
annotation
- the annotation whose position should be returned
null
if no
associated annotation exists
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |