Hierarchy

Constructors

Properties

_activeEditorChanged: Signal<WidgetLSPAdapter<IDocumentWidget<FileEditor, DocumentRegistry.IModel>>, IEditorChangedData>

Signal emitted when the active editor have changed.

_adapterConnected: Signal<WidgetLSPAdapter<IDocumentWidget<FileEditor, DocumentRegistry.IModel>>, IDocumentConnectionData>

Signal emitted when the adapter is connected.

_disposed: Signal<WidgetLSPAdapter<IDocumentWidget<FileEditor, DocumentRegistry.IModel>>, void>

Signal emitted when the adapter is disposed.

_docRegistry: DocumentRegistry

The document registry instance.

_editorAdded: Signal<WidgetLSPAdapter<IDocumentWidget<FileEditor, DocumentRegistry.IModel>>, IEditorChangedData>

Signal emitted when an editor is changed.

_editorRemoved: Signal<WidgetLSPAdapter<IDocumentWidget<FileEditor, DocumentRegistry.IModel>>, IEditorChangedData>

Signal emitted when an editor is removed.

_readyDelegate: PromiseDelegate<void> = ...
_virtualEditor: IEditor
editor: FileEditor

The wrapped FileEditor widget.

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. Since there is only one editor, this method always return 0

    Parameters

    • position: IVirtualPosition

      the position of cursor in the virtual document.

    Returns number

    • index of the virtual editor

    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>