UNPKG

jupyterlab-emrys

Version:

A computational environment for Jupyter. Powered by Emrys

58 lines (57 loc) 1.88 kB
import { IKernel, KernelMessage } from 'jupyter-js-services'; import { IDisposable } from 'phosphor-disposable'; import { BaseCellWidget } from '../cells/widget'; import { CellEditorWidget, ITextChange, ICompletionRequest } from '../cells/editor'; import { CompletionWidget } from './widget'; /** * A completion handler for cell widgets. */ export declare class CellCompletionHandler implements IDisposable { /** * Construct a new completion handler for a widget. */ constructor(completion: CompletionWidget); /** * The kernel used by the completion handler. */ kernel: IKernel; /** * The cell widget used by the completion handler. */ activeCell: BaseCellWidget; /** * Get whether the completion handler is disposed. * * #### Notes * This is a read-only property. */ isDisposed: boolean; /** * Dispose of the resources used by the handler. */ dispose(): void; /** * Make a completion request using the kernel. */ protected makeRequest(request: ICompletionRequest): Promise<void>; /** * Receive a completion reply from the kernel. */ protected onReply(pending: number, request: ICompletionRequest, msg: KernelMessage.ICompleteReplyMsg): void; /** * Handle a text changed signal from an editor. */ protected onTextChanged(editor: CellEditorWidget, change: ITextChange): void; /** * Handle a completion requested signal from an editor. */ protected onCompletionRequested(editor: CellEditorWidget, request: ICompletionRequest): void; /** * Handle a completion selected signal from the completion widget. */ protected onCompletionSelected(widget: CompletionWidget, value: string): void; private _activeCell; private _completion; private _kernel; private _pending; }