NotebookController class
A notebook controller represents an entity that can execute notebook cells. This is often referred to as a kernel.
There can be multiple controllers and the editor will let users choose which controller to use for a certain notebook. The {@linkcode NotebookController.notebookTypenotebookType}-property defines for what kind of notebooks a controller is for and the {@linkcode NotebookController.updateNotebookAffinityupdateNotebookAffinity}-function allows controllers to set a preference for specific notebook documents. When a controller has been selected its {@link NotebookController.onDidChangeSelectedNotebooksonDidChangeSelectedNotebooks}-event fires.
When a cell is being run the editor will invoke the {@linkcode NotebookController.executeHandlerexecuteHandler} and a controller is expected to create and finalize a {@link NotebookCellExecutionnotebook cell execution}. However, controllers are also free to create executions by themselves.
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
- @anonymous
Constructors
-
NotebookController({String? id, String? notebookType, List<
String> ? supportedLanguages, String? label, String? description, String? detail, bool? supportsExecutionOrder, FutureOr<void> executeHandler(List<NotebookCell> , NotebookDocument, NotebookController)?, FutureOr<void> interruptHandler(NotebookDocument)?, Event<IInline81> ? onDidChangeSelectedNotebooks, NotebookCellExecution createNotebookCellExecution(NotebookCell)?, void updateNotebookAffinity(NotebookDocument, NotebookControllerAffinity)?, void dispose()?}) -
factory
Properties
- createNotebookCellExecution ↔ NotebookCellExecution Function(NotebookCell)
-
Available on NotebookController, provided by the NotebookController$Typings extension
getter/setter pair - description ↔ String?
-
Available on NotebookController, provided by the NotebookController$Typings extension
The human-readable description which is rendered less prominent.getter/setter pair - detail ↔ String?
-
Available on NotebookController, provided by the NotebookController$Typings extension
The human-readable detail which is rendered less prominent.getter/setter pair - dispose ↔ void Function()
-
Available on NotebookController, provided by the NotebookController$Typings extension
getter/setter pair -
executeHandler
↔ FutureOr<
void> Function(List<NotebookCell> , NotebookDocument, NotebookController) -
Available on NotebookController, provided by the NotebookController$Typings extension
The execute handler is invoked when the run gestures in the UI are selected, e.g Run Cell, Run All, Run Selection etc. The execute handler is responsible for creating and managing {@link NotebookCellExecution execution}-objects.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Available on NotebookController, provided by the NotebookController$Typings extension
The identifier of this notebook controller.no setter -
interruptHandler
↔ FutureOr<
void> Function(NotebookDocument)? -
Available on NotebookController, provided by the NotebookController$Typings extension
Optional interrupt handler.getter/setter pair - label ↔ String
-
Available on NotebookController, provided by the NotebookController$Typings extension
The human-readable label of this notebook controller.getter/setter pair - notebookType → String
-
Available on NotebookController, provided by the NotebookController$Typings extension
The notebook type this controller is for.no setter - onDidChangeSelectedNotebooks → Event
-
Available on NotebookController, provided by the NotebookController$Typings extension
An event that fires whenever a controller has been selected or un-selected for a notebook document.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
supportedLanguages
↔ List<
String> ? -
Available on NotebookController, provided by the NotebookController$Typings extension
An array of language identifiers that are supported by this controller. Any language identifier from {@linkcode languages.getLanguages getLanguages} is possible. When falsy all languages are supported.getter/setter pair - supportsExecutionOrder ↔ bool?
-
Available on NotebookController, provided by the NotebookController$Typings extension
Whether this controller supports execution order so that the editor can render placeholders for them.getter/setter pair - updateNotebookAffinity ↔ void Function(NotebookDocument, NotebookControllerAffinity)
-
Available on NotebookController, provided by the NotebookController$Typings extension
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited