Options
All
  • Public
  • Public/Protected
  • All
Menu

An implementation of a completer model.

Hierarchy

  • CompleterModel

Implements

Index

Properties

Private _completionItems

_completionItems: ICompletionItems = []

Private _current

_current: ITextState | null = null

Private _cursor

_cursor: ICursorSpan | null = null

Private _isDisposed

_isDisposed: boolean = false

Private _options

_options: string[] = []

Private _orderedTypes

_orderedTypes: string[] = []

Private _original

_original: ITextState | null = null

Private _query

_query: string = ""

Private _stateChanged

_stateChanged: Signal<this, void> = new Signal<this, void>(this)

Private _subsetMatch

_subsetMatch: boolean = false

Private _typeMap

_typeMap: TypeMap

Accessors

current

cursor

isDisposed

  • get isDisposed(): boolean

original

query

  • get query(): string
  • set query(newValue: string): void

stateChanged

  • get stateChanged(): ISignal<this, void>

subsetMatch

  • get subsetMatch(): boolean
  • set subsetMatch(newValue: boolean): void

Methods

Private _filter

  • _filter(): IIterator<IItem>

Private _markup

Private _reset

  • _reset(): void

Optional completionItems

createPatch

  • createPatch(patch: string): IPatch | undefined
  • Create a resolved patch between the original state and a patch string.

    Parameters

    • patch: string

      The patch string to apply to the original value.

    Returns IPatch | undefined

    A patched text change or undefined if original value did not exist.

dispose

  • dispose(): void

handleCursorChange

handleTextChange

items

  • items(): IIterator<IItem>

options

  • options(): IIterator<string>

orderedTypes

  • orderedTypes(): string[]
  • An ordered list of all the known types in the typeMap.

    Notes

    To visually encode the types of the completer matches, we assemble an ordered list. This list begins with:

    ['function', 'instance', 'class', 'module', 'keyword']

    and then has any remaining types listed alphebetically. This will give reliable visual encoding for these known types, but allow kernels to provide new types.

    Returns string[]

reset

  • reset(hard?: boolean): void
  • Reset the state of the model and emit a state change signal.

    Parameters

    • Default value hard: boolean = false

      Reset even if a subset match is in progress.

    Returns void

Optional setCompletionItems

setOptions

  • setOptions(newValue: IterableOrArrayLike<string>, typeMap?: TypeMap): void

typeMap

  • The map from identifiers (a.b) to types (function, module, class, instance, etc.).

    Notes

    A type map is currently only provided by the latest IPython kernel using the completer reply metadata field _jupyter_types_experimental. The values are completely up to the kernel.

    Returns TypeMap

Generated using TypeDoc