public class DocumentLineDiffer implements ILineDiffer,IDocumentListener,IAnnotationModel,ILineDifferExtension,ILineDifferExtension2(Code)
Standard implementation of ILineDiffer as an incremental diff engine. A
DocumentLineDiffer can be initialized to some start state. Once connected to a
IDocument and a reference document has been set, changes reported via the
IDocumentListener interface will be tracked and the incremental diff updated.
The diff state can be queried using the ILineDiffer interface.
Since diff information is model information attached to a document, this class implements
IAnnotationModel and can be attached to IAnnotationModelExtensions.
fireModelChanged() Informs all annotation model listeners that this model has been changed.
protected void
fireModelChanged(AnnotationModelEvent event) Informs all annotation model listeners that this model has been changed
as described in the annotation model event.
Informs all annotation model listeners that this model has been changed
as described in the annotation model event. The event is sent out
to all listeners implementing IAnnotationModelListenerExtension.
All other listeners are notified by just calling modelChanged(IAnnotationModel).
Parameters: event - the event to be sent out to the listeners
Unsynchronized version of documentAboutToBeChanged, called by documentAboutToBeChanged
and
DocumentLineDiffer.initialize() .
Parameters: event - the document event to be handled throws: BadLocationException - if document access fails
Implementation of documentChanged, non synchronized.
Parameters: event - the document event throws: BadLocationException - if document access fails somewhere