Class UiDocumentChangeRunner


  • public final class UiDocumentChangeRunner
    extends java.lang.Object
    Executes a DocumentChangeOperation in the UI thread.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      IDocumentChange run()
      Synchronously executes the document change operation in the UI thread.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UiDocumentChangeRunner

        public UiDocumentChangeRunner​(UiSynchronizer synchronizer,
                                      DocumentChangeOperation operation)
        Creates a new runner capable of executing the given document change operation in the UI thread.
        Parameters:
        synchronizer - used to execute operation in the UI thread - must not be null
        operation - a document change operation - must not be null
    • Method Detail

      • run

        public IDocumentChange run()
                            throws org.eclipse.jface.text.BadLocationException
        Synchronously executes the document change operation in the UI thread.

        Note that an update conflict may occur if the document's contents have changed since the inception of the snapshot on which the change is based. In that case, a StaleSnapshotException is thrown.

        Returns:
        undo change, if requested by the change. Otherwise, null
        Throws:
        StaleSnapshotException - if the document has changed since the inception of the snapshot on which the change is based
        org.eclipse.text.edits.MalformedTreeException - if the change's edit tree is not in a valid state
        org.eclipse.jface.text.BadLocationException - if one of the edits in the change's edit tree could not be executed