Theia API Documentation v1.65.0
    Preparing search index...

    A NotebookCellExecution is how notebook controller modify a notebook cell as it is executing.

    When a cell execution object is created, the cell enters the Pending state. When start(...) is called on the execution task, it enters the Executing state. When end(...) is called, it enters the Idle state.

    interface NotebookCellExecution {
        cell: NotebookCell;
        executionOrder: undefined | number;
        token: CancellationToken;
        appendOutput(
            out: NotebookCellOutput | readonly NotebookCellOutput[],
            cell?: NotebookCell,
        ): Thenable<void>;
        appendOutputItems(
            items: NotebookCellOutputItem | readonly NotebookCellOutputItem[],
            output: NotebookCellOutput,
        ): Thenable<void>;
        clearOutput(cell?: NotebookCell): Thenable<void>;
        end(success: undefined | boolean, endTime?: number): void;
        replaceOutput(
            out: NotebookCellOutput | readonly NotebookCellOutput[],
            cell?: NotebookCell,
        ): Thenable<void>;
        replaceOutputItems(
            items: NotebookCellOutputItem | readonly NotebookCellOutputItem[],
            output: NotebookCellOutput,
        ): Thenable<void>;
        start(startTime?: number): void;
    }
    Index

    Properties

    The cell for which this execution has been created.

    executionOrder: undefined | number

    Set and unset the order of this cell execution.

    A cancellation token which will be triggered when the cell execution is canceled from the UI.

    Note that the cancellation token will not be triggered when the controller that created this execution uses an interrupt-handler.

    Methods

    • Signal that execution has ended.

      Parameters

      • success: undefined | boolean

        If true, a green check is shown on the cell status bar. If false, a red X is shown. If undefined, no check or X icon is shown.

      • OptionalendTime: number

        The time that execution finished, in milliseconds in the Unix epoch.

      Returns void

    • Signal that the execution has begun.

      Parameters

      • OptionalstartTime: number

        The time that execution began, in milliseconds in the Unix epoch. Used to drive the clock that shows for how long a cell has been running. If not given, the clock won't be shown.

      Returns void