Interface ITextViewerExtension9

All Known Implementing Classes:
ProjectionViewer, SourceViewer, TextConsoleViewer, TextViewer

public interface ITextViewerExtension9
Extension interface for ITextViewer. Adds the ability to retrieve the last known selection from outside of the UI Thread.
Since:
3.16
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the last known selection from a cache, without polling widget.
  • Method Details

    • getLastKnownSelection

      ITextSelection getLastKnownSelection()
      Returns the last known selection from a cache, without polling widget.

      This may not be the current selection. Indeed, operations that change the selection without sending related events may not refresh the returned value.

      As opposed to ISelectionProvider.getSelection() that usually requires UI Thread, this method can run from any thread.

      Returns:
      the last known selection.