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.

层级

  • NotebookCellExecution

索引

Properties(3)

Readonly cell

The cell for which this execution has been created.

Readonly token

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.

executionOrder

executionOrder: undefined | number

Set and unset the order of this cell execution.

Methods(7)

start

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

    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

end

  • end(success: undefined | boolean, endTime?: number): void
  • 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.

    • Optional endTime: number

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

    Returns void

clearOutput

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

    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.

replaceOutput

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

    Parameters

    Returns Thenable<void>

    A thenable that resolves when the operation finished.

appendOutput

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

    Parameters

    Returns Thenable<void>

    A thenable that resolves when the operation finished.

replaceOutputItems

appendOutputItems

友链:VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc. Maintained by 洛竹