mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
Remove API compatibility layer for VS Code notebook extensions (#21225)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user