org.eclipse.xtext.ui.editor.quickfix
Class XtextResourceMarkerAnnotationModel

java.lang.Object
  extended by org.eclipse.jface.text.source.AnnotationModel
      extended by org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel
          extended by org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel
              extended by org.eclipse.xtext.ui.editor.quickfix.XtextResourceMarkerAnnotationModel
All Implemented Interfaces:
org.eclipse.core.filebuffers.IPersistableAnnotationModel, org.eclipse.jface.text.ISynchronizable, org.eclipse.jface.text.source.IAnnotationModel, org.eclipse.jface.text.source.IAnnotationModelExtension, org.eclipse.jface.text.source.IAnnotationModelExtension2

public class XtextResourceMarkerAnnotationModel
extends org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel

Author:
Heiko Behrens - Initial contribution and API, Sebastian Zarnekow

Field Summary
 
Fields inherited from class org.eclipse.jface.text.source.AnnotationModel
fAnnotationModelListeners, fAnnotations, fDocument
 
Constructor Summary
XtextResourceMarkerAnnotationModel(org.eclipse.core.resources.IFile file, IssueResolutionProvider issueResolutionProvider, IssueUtil markerUtil)
           
 
Method Summary
protected  void connected()
          Connects to the source of markers as marker change listener.
protected  org.eclipse.ui.texteditor.MarkerAnnotation createMarkerAnnotation(org.eclipse.core.resources.IMarker marker)
          Creates a new annotation for the given marker.
 void fireAnnotationChangedEvent(org.eclipse.jface.text.source.Annotation annotation)
           
 void fireQueuedEvents()
           
 void queueAnnotationChanged(org.eclipse.jface.text.source.Annotation annotation)
           
 void updateMarkers(org.eclipse.jface.text.IDocument document)
          Updates the markers managed by this annotation model by calling all registered marker updaters (IMarkerUpdater).
 
Methods inherited from class org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel
deleteMarkers, getResource, isAcceptable, listenToMarkerChanges, retrieveMarkers, update
 
Methods inherited from class org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel
addMarkerAnnotation, addMarkerUpdater, commit, createPositionFromMarker, disconnected, getMarkerAnnotation, getMarkerPosition, handleCoreException, modifyMarkerAnnotation, reinitialize, removeAnnotations, removeMarkerAnnotation, removeMarkerUpdater, resetMarkers, revert, updateMarker, updateMarker
 
Methods inherited from class org.eclipse.jface.text.source.AnnotationModel
addAnnotation, addAnnotation, addAnnotationModel, addAnnotationModelListener, addPosition, cleanup, connect, createAnnotationModelEvent, disconnect, fireModelChanged, fireModelChanged, getAnnotationIterator, getAnnotationIterator, getAnnotationIterator, getAnnotationMap, getAnnotationModel, getAnnotationModelEvent, getLockObject, getModificationStamp, getPosition, modifyAnnotation, modifyAnnotationPosition, modifyAnnotationPosition, removeAllAnnotations, removeAllAnnotations, removeAnnotation, removeAnnotation, removeAnnotationModel, removeAnnotationModelListener, removePosition, replaceAnnotations, replaceAnnotations, setLockObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XtextResourceMarkerAnnotationModel

public XtextResourceMarkerAnnotationModel(org.eclipse.core.resources.IFile file,
                                          IssueResolutionProvider issueResolutionProvider,
                                          IssueUtil markerUtil)
Method Detail

createMarkerAnnotation

protected org.eclipse.ui.texteditor.MarkerAnnotation createMarkerAnnotation(org.eclipse.core.resources.IMarker marker)
Description copied from class: org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel
Creates a new annotation for the given marker.

Subclasses may override.

Overrides:
createMarkerAnnotation in class org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel
Parameters:
marker - the marker
Returns:
the new marker annotation

fireAnnotationChangedEvent

public void fireAnnotationChangedEvent(org.eclipse.jface.text.source.Annotation annotation)

queueAnnotationChanged

public void queueAnnotationChanged(org.eclipse.jface.text.source.Annotation annotation)

fireQueuedEvents

public void fireQueuedEvents()

connected

protected void connected()
Description copied from class: org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel
Connects to the source of markers as marker change listener.

Overrides:
connected in class org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel
See Also:
AnnotationModel.connected()

updateMarkers

public void updateMarkers(org.eclipse.jface.text.IDocument document)
                   throws org.eclipse.core.runtime.CoreException
Description copied from class: org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel
Updates the markers managed by this annotation model by calling all registered marker updaters (IMarkerUpdater).

Overrides:
updateMarkers in class org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel
Parameters:
document - the document to which this model is currently connected
Throws:
org.eclipse.core.runtime.CoreException - if there is a problem updating the markers