Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface NotebookCellExecution

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 {@linkcode NotebookCellExecutionState.Pending Pending} state. When start(...) is called on the execution task, it enters the {@linkcode NotebookCellExecutionState.Executing Executing} state. When end(...) is called, it enters the {@linkcode NotebookCellExecutionState.Idle Idle} state.

Hierarchy

  • NotebookCellExecution

Index

Properties

The cell for which this execution has been created.

stubbed
executionOrder: undefined | number

Set and unset the order of this cell execution.

stubbed

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.

stubbed

Methods

  • Clears the output of the cell that is executing or of another cell that is affected by this execution.

    stubbed

    Parameters

    • Optional cell: NotebookCell

      Cell for which output is cleared. Defaults to the cell of this execution.

    Returns Thenable<void>

    A thenable that resolves when the operation finished.

  • end(success: undefined | boolean, endTime?: number): void
  • Signal that execution has ended.

    stubbed

    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.

    • Optional endTime: number

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

    Returns void

  • start(startTime?: number): void
  • Signal that the execution has begun.

    stubbed

    Parameters

    • Optional startTime: 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