Datalayer VS Code Extension - v0.0.4
    Preparing search index...

    Custom editor provider for Jupyter notebooks with dual-mode support. Handles both local file-based notebooks and collaborative Datalayer notebooks with runtime management, webview communication, and real-time synchronization.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _context: ExtensionContext
    _messageRouter: DocumentMessageRouter
    _networkBridge: NetworkBridgeService
    _onDidChangeCustomDocument: EventEmitter<
        CustomDocumentEditEvent<NotebookDocument>,
    > = ...

    Event emitter for document changes. Subclasses should fire this event when documents change.

    _runtimeBridge: RuntimeBridgeService
    onDidChangeCustomDocument: Event<CustomDocumentEditEvent<NotebookDocument>> = ...

    Event for document changes (required by CustomEditorProvider interface).

    webviews: WebviewCollection = ...

    Tracks all known webviews

    newNotebookFileId: number = 1
    viewType: "datalayer.jupyter-notebook"

    Methods

    • Creates a backup of a custom document.

      Parameters

      • document: NotebookDocument

        Document to backup

      • context: CustomDocumentBackupContext

        Backup context with destination

      • cancellation: CancellationToken

        Cancellation token

      Returns Thenable<CustomDocumentBackup>

      Promise resolving to backup descriptor

    • Get the static HTML used for the editor's webviews.

      Parameters

      • webview: Webview

        The webview instance

      Returns string

      HTML content for the webview

    • Posts a message to the webview without expecting a response.

      Parameters

      • panel: WebviewPanel

        Target webview panel

      • type: string

        Message type

      • body: unknown

        Message body

      • Optionalid: string

        Optional message ID

      Returns void

    • Posts a message to the webview and waits for a response. Uses the request/response pattern with requestId tracking.

      Type Parameters

      • R = unknown

      Parameters

      • panel: WebviewPanel

        Target webview panel

      • type: string

        Message type

      • body: unknown

        Message body

      Returns Promise<R>

      Promise resolving to the response

    • Resolves a custom editor by setting up the webview and initializing communication.

      Parameters

      • document: NotebookDocument

        The notebook document to display

      • webviewPanel: WebviewPanel

        The webview panel for the editor

      • _token: CancellationToken

        Cancellation token

      Returns Promise<void>

      Promise that resolves when editor is ready

    • Registers the notebook editor provider and commands.

      Parameters

      • context: ExtensionContext

        Extension context for resource management

      Returns Disposable

      Disposable for cleanup