NotebookController
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.notebookType notebookType}-property defines for what kind of notebooks a controller is for and the {@linkcode NotebookController.updateNotebookAffinity updateNotebookAffinity}-function allows controllers to set a preference for specific notebook documents. When a controller has been selected its NotebookController.onDidChangeSelectedNotebooks-event fires.
When a cell is being run the editor will invoke the {@linkcode NotebookController.executeHandler executeHandler} and a controller is expected to create and finalize a notebook cell execution. However, controllers are also free to create executions by themselves.
Properties
The human-readable description which is rendered less prominent.
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 execution-objects.
Optional interrupt handler.
The notebook type this controller is for.
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.
Whether this controller supports execution order so that the editor can render placeholders for them.
Functions
Create a cell execution task.
A controller can set affinities for specific notebook documents. This allows a controller to be presented more prominent for some notebooks.