|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.text.source.AnnotationModelEvent
Specification of changes applied to annotation models. The event carries the changed annotation model as well as added, removed, and modified annotations.
An event can be sealed. Afterwards it can not be modified. Thus, the normal process is that an empty event is created, filled with the changed information, and before it is sent to the listeners, the event is sealed.
IAnnotationModel
,
IAnnotationModelListenerExtension
Constructor Summary | |
---|---|
AnnotationModelEvent(IAnnotationModel model)
Creates a new annotation model event for the given model. |
|
AnnotationModelEvent(IAnnotationModel model,
boolean isWorldChange)
Creates a new annotation model event for the given model. |
Method Summary | |
---|---|
void |
annotationAdded(Annotation annotation)
Adds the given annotation to the set of annotations that are reported as being added from the model. |
void |
annotationChanged(Annotation annotation)
Adds the given annotation to the set of annotations that are reported as being changed from the model. |
void |
annotationRemoved(Annotation annotation)
Adds the given annotation to the set of annotations that are reported as being removed from the model. |
void |
annotationRemoved(Annotation annotation,
Position position)
Adds the given annotation to the set of annotations that are reported as being removed from the model. |
Annotation[] |
getAddedAnnotations()
Returns the added annotations. |
IAnnotationModel |
getAnnotationModel()
Returns the model this event refers to. |
Annotation[] |
getChangedAnnotations()
Returns the changed annotations. |
Position |
getPositionOfRemovedAnnotation(Annotation annotation)
Returns the position of the removed annotation at that point in time when the annotation has been removed. |
Annotation[] |
getRemovedAnnotations()
Returns the removed annotations. |
boolean |
isEmpty()
Returns whether this annotation model event is empty or not. |
boolean |
isValid()
Returns whether this annotation model event is still valid. |
boolean |
isWorldChange()
Returns whether this annotation model events contains detailed information about the modifications applied to the event annotation model or whether it represents a world change. |
void |
markSealed()
Seals this event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AnnotationModelEvent(IAnnotationModel model)
model
- the modelpublic AnnotationModelEvent(IAnnotationModel model, boolean isWorldChange)
model
- the modelisWorldChange
- true
if world changeMethod Detail |
public IAnnotationModel getAnnotationModel()
public void annotationAdded(Annotation annotation)
annotation
- the added annotationpublic Annotation[] getAddedAnnotations()
public void annotationRemoved(Annotation annotation)
annotation
- the removed annotationpublic void annotationRemoved(Annotation annotation, Position position)
annotation
- the removed annotationposition
- the position of the removed annotationpublic Annotation[] getRemovedAnnotations()
public Position getPositionOfRemovedAnnotation(Annotation annotation)
annotation
- the removed annotation
null
public void annotationChanged(Annotation annotation)
annotation
- the changed annotationpublic Annotation[] getChangedAnnotations()
public boolean isEmpty()
false
although the event does not carry any added, removed, or changed
annotations.
true
if this event is emptypublic boolean isWorldChange()
true
if world change, false
otherwisepublic boolean isValid()
true
if this event is still valid, false
otherwisepublic void markSealed()
|
Eclipse Platform Release 3.1 |
|||||||||||
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, 2005. All rights reserved.