Class UiDocumentChangeRunner

java.lang.Object
org.eclipse.handly.text.UiDocumentChangeRunner

public final class UiDocumentChangeRunner extends Object
Executes a DocumentChangeOperation in the UI thread.
  • Constructor Details

    • 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 Details

    • 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