Remove API compatibility layer for VS Code notebook extensions (#21225)

This commit is contained in:
Cory Rivera
2022-11-15 10:38:41 -08:00
committed by GitHub
parent 1105e4d15c
commit a37d6230f9
41 changed files with 74 additions and 2197 deletions

View File

@@ -15,13 +15,9 @@ import { LocalContentManager } from 'sql/workbench/services/notebook/common/loca
import { Deferred } from 'sql/base/common/promise';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import type { FutureInternal } from 'sql/workbench/services/notebook/browser/interfaces';
import { Registry } from 'vs/platform/registry/common/platform';
import { INotebookProviderRegistry, NotebookProviderRegistryId } from 'sql/workbench/services/notebook/common/notebookRegistry';
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
import { SqlExtHostContext, SqlMainContext } from 'vs/workbench/api/common/extHost.protocol';
const notebookRegistry = Registry.as<INotebookProviderRegistry>(NotebookProviderRegistryId);
@extHostNamedCustomer(SqlMainContext.MainThreadNotebook)
export class MainThreadNotebook extends Disposable implements MainThreadNotebookShape {
@@ -101,14 +97,6 @@ export class MainThreadNotebook extends Disposable implements MainThreadNotebook
future.onDone(done);
}
}
public $updateProviderKernels(providerId: string, languages: azdata.nb.IStandardKernel[]): void {
notebookRegistry.updateProviderKernels(providerId, languages);
}
public $updateKernelLanguages(providerId: string, kernelName: string, languages: string[]): void {
notebookRegistry.updateKernelLanguages(providerId, kernelName, languages);
}
//#endregion
}

View File

@@ -345,14 +345,6 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
}
}
/**
* Attempts to create a new notebook with the specified provider and contents. Used for VS Code extension compatibility.
*/
async $tryCreateNotebookDocument(providerId: string, contents?: azdata.nb.INotebookContents): Promise<UriComponents> {
let input = await this._notebookService.createNotebookInputFromContents(providerId, contents);
return input.resource;
}
$tryShowNotebookDocument(resource: UriComponents, options: INotebookShowOptions): Promise<string> {
// Append a numbered suffix if an untitled notebook is already open with the same path
if (resource.scheme === Schemas.untitled) {