mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 09:38:38 +01:00
remove deprecated API
This commit is contained in:
@@ -79,7 +79,7 @@ suite('Notebook Document', function () {
|
||||
assert.strictEqual(notebook.isUntitled, false);
|
||||
assert.strictEqual(notebook.cellCount, 1);
|
||||
|
||||
assert.strictEqual(notebook.viewType, 'notebook.nbdtest');
|
||||
assert.strictEqual(notebook.notebookType, 'notebook.nbdtest');
|
||||
});
|
||||
|
||||
test('notebook open/close, notebook ready when cell-document open event is fired', async function () {
|
||||
@@ -285,7 +285,7 @@ suite('Notebook Document', function () {
|
||||
assert.strictEqual(notebook.isDirty, false);
|
||||
assert.strictEqual(notebook.isUntitled, false);
|
||||
assert.strictEqual(notebook.cellCount, 1);
|
||||
assert.strictEqual(notebook.viewType, 'notebook.nbdtest');
|
||||
assert.strictEqual(notebook.notebookType, 'notebook.nbdtest');
|
||||
|
||||
const edit = new vscode.WorkspaceEdit();
|
||||
edit.replaceNotebookCells(notebook.uri, new vscode.NotebookRange(0, 0), [{
|
||||
|
||||
@@ -36,9 +36,9 @@ class Kernel {
|
||||
readonly associatedNotebooks = new Set<string>();
|
||||
|
||||
constructor(id: string, label: string) {
|
||||
this.controller = vscode.notebook.createNotebookController(id, 'notebookCoreTest', label);
|
||||
this.controller = vscode.notebooks.createNotebookController(id, 'notebookCoreTest', label);
|
||||
this.controller.executeHandler = this._execute.bind(this);
|
||||
this.controller.hasExecutionOrder = true;
|
||||
this.controller.supportsExecutionOrder = true;
|
||||
this.controller.supportedLanguages = ['typescript', 'javascript'];
|
||||
this.controller.onDidChangeNotebookAssociation(e => {
|
||||
if (e.selected) {
|
||||
@@ -167,7 +167,7 @@ suite('Notebook API tests', function () {
|
||||
kernel1 = new Kernel('mainKernel', 'Notebook Primary Test Kernel');
|
||||
|
||||
const listener = vscode.notebook.onDidOpenNotebookDocument(async notebook => {
|
||||
if (notebook.viewType === kernel1.controller.viewType) {
|
||||
if (notebook.notebookType === kernel1.controller.notebookType) {
|
||||
await vscode.commands.executeCommand('notebook.selectKernel', {
|
||||
extension: 'vscode.vscode-api-tests',
|
||||
id: kernel1.controller.id
|
||||
@@ -179,7 +179,7 @@ suite('Notebook API tests', function () {
|
||||
kernel2 = new class extends Kernel {
|
||||
constructor() {
|
||||
super('secondaryKernel', 'Notebook Secondary Test Kernel');
|
||||
this.controller.hasExecutionOrder = false;
|
||||
this.controller.supportsExecutionOrder = false;
|
||||
}
|
||||
|
||||
override async _runCell(cell: vscode.NotebookCell) {
|
||||
|
||||
Reference in New Issue
Block a user