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

    Manages virtual TextDocuments for notebook cells using vscode-notebook-cell:// URIs. Uses VS Code's TextDocumentContentProvider to serve cell content in memory.

    Implements

    • TextDocumentContentProvider
    Index

    Constructors

    Properties

    _onDidChangeEmitter: EventEmitter<Uri> = ...

    Event emitter for document content changes

    contentProviderDisposable?: Disposable

    Content provider disposable

    documents: Map<string, VirtualDocument> = ...

    Map of cell ID to virtual document info

    onDidChange: Event<Uri> = ...

    Event fired when document content changes (required by TextDocumentContentProvider)

    Methods

    • Create a new virtual document for a cell.

      Parameters

      • notebookId: string

        Unique notebook identifier

      • cellId: string

        Unique cell identifier

      • content: string

        Initial cell content

      • language: CellLanguage

        Cell language (python or markdown)

      • source: "notebook" | "lexical" = "notebook"

        Source type (notebook or lexical)

      Returns Promise<Uri>

      Promise that resolves to URI of the created document

    • Get TextDocument for a cell (opens if not already open).

      Parameters

      • cellId: string

        Cell identifier

      Returns Promise<TextDocument>

      Promise that resolves to TextDocument or undefined

    • Provide text document content (required by TextDocumentContentProvider).

      Parameters

      • uri: Uri

        Document URI

      Returns string

      Document content or undefined if not found

    • Update the content of an existing virtual document.

      Parameters

      • cellId: string

        Cell identifier

      • content: string

        New cell content

      Returns void