Class CompletionHandler

A completion handler for editors.

Hierarchy

  • CompletionHandler

Implements

Constructors

Properties

_autoCompletion: any
_composeRequest: any
_continuousInline: any
_editor: any
_enabled: any
_fetchingInline: any
_isDisposed: any
_makeInlineRequest: any
_makeRequest: any

Make a completion request.

_onSharedModelChanged: any

Handle a text shared model change signal from an editor.

_reconciliator: any
_updateModel: any

Updates model with text state and current cursor position.

completer: Completer

The completer widget managed by the handler.

inlineCompleter: InlineCompleter

Accessors

  • get autoCompletion(): boolean
  • Returns boolean

  • set autoCompletion(value): void
  • Enable/disable continuous hinting mode.

    Parameters

    • value: boolean

    Returns void

  • get editor(): IEditor
  • The editor used by the completion handler.

    Returns IEditor

  • set editor(newValue): void
  • Parameters

    • newValue: IEditor

    Returns void

  • get isDisposed(): boolean
  • Get whether the completion handler is disposed.

    Returns boolean

  • set reconciliator(reconciliator): void
  • Parameters

    Returns void

Methods

  • Dispose of the resources used by the handler.

    Returns void

  • Get the state of the text editor at the given position.

    Parameters

    • editor: IEditor
    • position: IPosition

    Returns ITextState

  • Invoke the handler and launch a completer.

    Returns void

  • Invoke the inline completer on explicit user request.

    Returns void

  • Handle a completion selected signal from the completion widget.

    Parameters

    Returns void

  • Handle invoke-request messages.

    Parameters

    • msg: Message

    Returns void

  • Handle selection changed signal from an editor.

    Notes

    If a sub-class reimplements this method, then that class must either call its super method or it must take responsibility for adding and removing the completer completable class to the editor host node.

    Despite the fact that the editor widget adds a class whenever there is a primary selection, this method checks independently for two reasons:

    1. The editor widget connects to the same signal to add that class, so there is no guarantee that the class will be added before this method is invoked so simply checking for the CSS class's existence is not an option. Secondarily, checking the editor state should be faster than querying the DOM in either case.
    2. Because this method adds a class that indicates whether completer functionality ought to be enabled, relying on the behavior of the jp-mod-has-primary-selection to filter out any editors that have a selection means the semantic meaning of jp-mod-completer-enabled is obscured because there may be cases where the enabled class is added even though the completer is not available.

    Returns void

  • Handle a text changed signal from an editor.

    Parameters

    Returns Promise<void>

  • Handle a visibility change signal from a completer widget.

    Parameters

    Returns void

  • Process a message sent to the completion handler.

    Parameters

    • msg: Message

    Returns void

Generated using TypeDoc