Hierarchy

Constructors

Properties

_activeEditorChanged: Signal<WidgetLSPAdapter<NotebookPanel>, IEditorChangedData>

Signal emitted when the active editor have changed.

_adapterConnected: Signal<WidgetLSPAdapter<NotebookPanel>, IDocumentConnectionData>

Signal emitted when the adapter is connected.

_cellToEditor: WeakMap<Cell<ICellModel>, IEditor>

Mapping of cell to editor accessor to ensure accessor uniqueness.

_disposed: Signal<WidgetLSPAdapter<NotebookPanel>, void>

Signal emitted when the adapter is disposed.

_editorAdded: Signal<WidgetLSPAdapter<NotebookPanel>, IEditorChangedData>

Signal emitted when an editor is changed.

_editorRemoved: Signal<WidgetLSPAdapter<NotebookPanel>, IEditorChangedData>

Signal emitted when an editor is removed.

_editorToCell: Map<IEditor, Cell<ICellModel>>

A map between the editor accessor and the containing cell

_languageInfo: ILanguageInfoMetadata

Metadata of the notebook

_readyDelegate: PromiseDelegate<void> = ...
_type: string = 'code'
editor: Notebook

The wrapped Notebook widget.

editorWidget: NotebookPanel
options: IAdapterOptions

Accessors

  • get activeEditorChanged(): ISignal<WidgetLSPAdapter<T>, IEditorChangedData>
  • Signal emitted when the active editor have changed.

    Returns ISignal<WidgetLSPAdapter<T>, IEditorChangedData>

  • get adapterConnected(): ISignal<WidgetLSPAdapter<T>, IDocumentConnectionData>
  • Signal emitted when the adapter is connected.

    Returns ISignal<WidgetLSPAdapter<T>, IDocumentConnectionData>

  • get connectionManager(): ILSPDocumentConnectionManager
  • The LSP document and connection manager instance.

    Returns ILSPDocumentConnectionManager

  • get disposed(): ISignal<WidgetLSPAdapter<T>, void>
  • Signal emitted when the adapter is disposed.

    Returns ISignal<WidgetLSPAdapter<T>, void>

  • get editorAdded(): ISignal<WidgetLSPAdapter<T>, IEditorChangedData>
  • Signal emitted when the an editor is changed.

    Returns ISignal<WidgetLSPAdapter<T>, IEditorChangedData>

  • get editorRemoved(): ISignal<WidgetLSPAdapter<T>, IEditorChangedData>
  • Signal emitted when the an editor is removed.

    Returns ISignal<WidgetLSPAdapter<T>, IEditorChangedData>

  • get hasMultipleEditors(): boolean
  • Check if the document contains multiple editors

    Returns boolean

  • get isConnected(): boolean
  • The virtual document is connected or not

    Returns boolean

  • get isDisposed(): boolean
  • Check if the adapter is disposed

    Returns boolean

  • get language(): string
  • Get the language identifier of the document

    Returns string

  • get updateFinished(): Promise<void>
  • Promise that resolves once the document is updated

    Returns Promise<void>

  • get virtualDocument(): null | VirtualDocument
  • Internal virtual document of the adapter.

    Returns null | VirtualDocument

  • get widgetId(): string
  • Get the ID of the internal widget.

    Returns string

Methods

  • Opens a connection for the document. The connection may or may not be initialized, yet, and depending on when this is called, the client may not be fully connected.

    Parameters

    • virtualDocument: VirtualDocument

      a VirtualDocument

    • Optional sendOpen: boolean

      whether to open the document immediately

    Returns Promise<void>

  • Disconnect virtual document from the language server.

    Returns void

  • Callback called on the document changed event.

    Parameters

    • virtualDocument: VirtualDocument
    • document: VirtualDocument
    • Optional isInit: boolean

    Returns void

  • Get the index of editor from the cursor position in the virtual document.

    Parameters

    • position: IVirtualPosition

      the position of cursor in the virtual document.

    Returns number

    Deprecated

    This is error-prone and will be removed in JupyterLab 5.0, use getEditorIndex() with virtualDocument.getEditorAtVirtualLine(position) instead.

  • Create the virtual document using current path and language.

    Returns void

  • Connect the virtual document with the language server.

    Parameters

    • data: IDocumentConnectionData

    Returns Promise<void>

  • Callback on connection closed event.

    Parameters

    • _: ILSPDocumentConnectionManager
    • __namedParameters: IDocumentConnectionData

    Returns void

  • Handler for opening a document contained in a parent document. The assumption is that the editor already exists for this, and as such the document should be queued for immediate opening.

    Parameters

    • host: VirtualDocument

      the VirtualDocument that contains the VirtualDocument in another language

    • context: IForeignContext

      information about the foreign VirtualDocument

    Returns Promise<void>

  • Returns void

  • Update the virtual document.

    Returns Promise<void>