diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/notebook.kernel.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.kernel.test.ts index 0c4cff5cf4b36..fa92d91e8a21d 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/notebook.kernel.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.kernel.test.ts @@ -124,18 +124,6 @@ const apiTestContentProvider: vscode.NotebookContentProvider = { ] }; return dto; - }, - saveNotebook: async (_document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) => { - return; - }, - saveNotebookAs: async (_targetResource: vscode.Uri, _document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) => { - return; - }, - backupNotebook: async (_document: vscode.NotebookDocument, _context: vscode.NotebookDocumentBackupContext, _cancellation: vscode.CancellationToken) => { - return { - id: '1', - delete: () => { } - }; } }; diff --git a/extensions/vscode-notebook-tests/src/extension.ts b/extensions/vscode-notebook-tests/src/extension.ts index 7160f07c1a10f..4cd81a747568c 100644 --- a/extensions/vscode-notebook-tests/src/extension.ts +++ b/extensions/vscode-notebook-tests/src/extension.ts @@ -43,18 +43,6 @@ export function activate(context: vscode.ExtensionContext): any { }; return dto; - }, - saveNotebook: async (_document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) => { - return; - }, - saveNotebookAs: async (_targetResource: vscode.Uri, _document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) => { - return; - }, - backupNotebook: async (_document: vscode.NotebookDocument, _context: vscode.NotebookDocumentBackupContext, _cancellation: vscode.CancellationToken) => { - return { - id: '1', - delete: () => { } - }; } })); diff --git a/src/vs/workbench/api/browser/mainThreadNotebook.ts b/src/vs/workbench/api/browser/mainThreadNotebook.ts index d6b554ebb17ab..51986a3ad3ce7 100644 --- a/src/vs/workbench/api/browser/mainThreadNotebook.ts +++ b/src/vs/workbench/api/browser/mainThreadNotebook.ts @@ -11,7 +11,7 @@ import { URI } from 'vs/base/common/uri'; import { NotebookDto } from 'vs/workbench/api/browser/mainThreadNotebookDto'; import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers'; import { INotebookCellStatusBarService } from 'vs/workbench/contrib/notebook/common/notebookCellStatusBarService'; -import { INotebookCellStatusBarItemProvider, INotebookContributionData, NotebookData as NotebookData, NotebookExtensionDescription, TransientCellMetadata, TransientDocumentMetadata, TransientOptions } from 'vs/workbench/contrib/notebook/common/notebookCommon'; +import { INotebookCellStatusBarItemProvider, INotebookContributionData, NotebookData as NotebookData, NotebookExtensionDescription, TransientOptions } from 'vs/workbench/contrib/notebook/common/notebookCommon'; import { INotebookContentProvider, INotebookService, SimpleNotebookProviderInfo } from 'vs/workbench/contrib/notebook/common/notebookService'; import { SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/common/proxyIdentifier'; import { ExtHostContext, ExtHostNotebookShape, MainContext, MainThreadNotebookShape } from '../common/extHost.protocol'; @@ -67,15 +67,7 @@ export class MainThreadNotebooks implements MainThreadNotebookShape { transientOptions: contentOptions }; }, - save: async (uri: URI, token: CancellationToken) => { - return this._proxy.$saveNotebook(viewType, uri, token); - }, - saveAs: async (uri: URI, target: URI, token: CancellationToken) => { - return this._proxy.$saveNotebookAs(viewType, uri, target, token); - }, - backup: async (uri: URI, token: CancellationToken) => { - return this._proxy.$backupNotebook(viewType, uri, token); - } + backup: async (uri: URI, token: CancellationToken) => '' }; const disposable = new DisposableStore(); @@ -86,19 +78,6 @@ export class MainThreadNotebooks implements MainThreadNotebookShape { this._notebookProviders.set(viewType, { controller, disposable }); } - async $updateNotebookProviderOptions(viewType: string, options?: { transientOutputs: boolean; transientCellMetadata: TransientCellMetadata; transientDocumentMetadata: TransientDocumentMetadata }): Promise { - const provider = this._notebookProviders.get(viewType); - - if (provider && options) { - provider.controller.options = options; - this._notebookService.listNotebookDocuments().forEach(document => { - if (document.viewType === viewType) { - document.transientOptions = provider.controller.options; - } - }); - } - } - async $unregisterNotebookProvider(viewType: string): Promise { const entry = this._notebookProviders.get(viewType); if (entry) { @@ -107,7 +86,6 @@ export class MainThreadNotebooks implements MainThreadNotebookShape { } } - $registerNotebookSerializer(handle: number, extension: NotebookExtensionDescription, viewType: string, options: TransientOptions, data: INotebookContributionData | undefined): void { const registration = this._notebookService.registerNotebookSerializer(viewType, extension, { options, diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 9a7f2faa5b588..3de62a38d34ac 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -157,7 +157,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I const extHostDocuments = rpcProtocol.set(ExtHostContext.ExtHostDocuments, new ExtHostDocuments(rpcProtocol, extHostDocumentsAndEditors)); const extHostDocumentContentProviders = rpcProtocol.set(ExtHostContext.ExtHostDocumentContentProviders, new ExtHostDocumentContentProvider(rpcProtocol, extHostDocumentsAndEditors, extHostLogService)); const extHostDocumentSaveParticipant = rpcProtocol.set(ExtHostContext.ExtHostDocumentSaveParticipant, new ExtHostDocumentSaveParticipant(extHostLogService, extHostDocuments, rpcProtocol.getProxy(MainContext.MainThreadBulkEdits))); - const extHostNotebook = rpcProtocol.set(ExtHostContext.ExtHostNotebook, new ExtHostNotebookController(rpcProtocol, extHostCommands, extHostDocumentsAndEditors, extHostDocuments, extensionStoragePaths)); + const extHostNotebook = rpcProtocol.set(ExtHostContext.ExtHostNotebook, new ExtHostNotebookController(rpcProtocol, extHostCommands, extHostDocumentsAndEditors, extHostDocuments)); const extHostNotebookDocuments = rpcProtocol.set(ExtHostContext.ExtHostNotebookDocuments, new ExtHostNotebookDocuments(extHostNotebook)); const extHostNotebookEditors = rpcProtocol.set(ExtHostContext.ExtHostNotebookEditors, new ExtHostNotebookEditors(extHostLogService, extHostNotebook)); const extHostNotebookKernels = rpcProtocol.set(ExtHostContext.ExtHostNotebookKernels, new ExtHostNotebookKernels(rpcProtocol, initData, extHostNotebook, extHostCommands, extHostLogService)); diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index 98e4262551897..d355265276ee0 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -962,7 +962,6 @@ export interface INotebookCellStatusBarListDto { export interface MainThreadNotebookShape extends IDisposable { $registerNotebookProvider(extension: notebookCommon.NotebookExtensionDescription, viewType: string, options: notebookCommon.TransientOptions, registration: notebookCommon.INotebookContributionData | undefined): Promise; - $updateNotebookProviderOptions(viewType: string, options?: { transientOutputs: boolean; transientCellMetadata: notebookCommon.TransientCellMetadata; transientDocumentMetadata: notebookCommon.TransientDocumentMetadata }): Promise; $unregisterNotebookProvider(viewType: string): Promise; $registerNotebookSerializer(handle: number, extension: notebookCommon.NotebookExtensionDescription, viewType: string, options: notebookCommon.TransientOptions, registration: notebookCommon.INotebookContributionData | undefined): void; @@ -2056,9 +2055,6 @@ export interface ExtHostNotebookShape extends ExtHostNotebookDocumentsAndEditors $releaseNotebookCellStatusBarItems(id: number): void; $openNotebook(viewType: string, uri: UriComponents, backupId: string | undefined, untitledDocumentData: VSBuffer | undefined, token: CancellationToken): Promise>; - $saveNotebook(viewType: string, uri: UriComponents, token: CancellationToken): Promise; - $saveNotebookAs(viewType: string, uri: UriComponents, target: UriComponents, token: CancellationToken): Promise; - $backupNotebook(viewType: string, uri: UriComponents, cancellation: CancellationToken): Promise; $dataToNotebook(handle: number, data: VSBuffer, token: CancellationToken): Promise>; $notebookToData(handle: number, data: SerializableObjectWithBuffers, token: CancellationToken): Promise; diff --git a/src/vs/workbench/api/common/extHostNotebook.ts b/src/vs/workbench/api/common/extHostNotebook.ts index 6a1df44dc0e24..4a3c51fa79ba5 100644 --- a/src/vs/workbench/api/common/extHostNotebook.ts +++ b/src/vs/workbench/api/common/extHostNotebook.ts @@ -7,7 +7,6 @@ import { VSBuffer } from 'vs/base/common/buffer'; import { CancellationToken } from 'vs/base/common/cancellation'; import { Emitter, Event } from 'vs/base/common/event'; import { IRelativePattern } from 'vs/base/common/glob'; -import { hash } from 'vs/base/common/hash'; import { DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle'; import { ResourceMap } from 'vs/base/common/map'; import { MarshalledId } from 'vs/base/common/marshallingIds'; @@ -20,7 +19,6 @@ import { ExtHostNotebookShape, IMainContext, IModelAddedData, INotebookCellStatu import { ApiCommand, ApiCommandArgument, ApiCommandResult, CommandsConverter, ExtHostCommands } from 'vs/workbench/api/common/extHostCommands'; import { ExtHostDocuments } from 'vs/workbench/api/common/extHostDocuments'; import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/common/extHostDocumentsAndEditors'; -import { IExtensionStoragePaths } from 'vs/workbench/api/common/extHostStoragePaths'; import * as typeConverters from 'vs/workbench/api/common/extHostTypeConverters'; import * as extHostTypes from 'vs/workbench/api/common/extHostTypes'; import { INotebookExclusiveDocumentFilter, INotebookContributionData } from 'vs/workbench/contrib/notebook/common/notebookCommon'; @@ -75,7 +73,6 @@ export class ExtHostNotebookController implements ExtHostNotebookShape { commands: ExtHostCommands, private _textDocumentsAndEditors: ExtHostDocumentsAndEditors, private _textDocuments: ExtHostDocuments, - private readonly _extensionStoragePaths: IExtensionStoragePaths, ) { this._notebookProxy = mainContext.getProxy(MainContext.MainThreadNotebook); this._notebookDocumentsProxy = mainContext.getProxy(MainContext.MainThreadNotebookDocuments); @@ -157,14 +154,6 @@ export class ExtHostNotebookController implements ExtHostNotebookShape { this._notebookContentProviders.set(viewType, { extension, provider }); - let listener: IDisposable | undefined; - if (provider.onDidChangeNotebookContentOptions) { - listener = provider.onDidChangeNotebookContentOptions(() => { - const internalOptions = typeConverters.NotebookDocumentContentOptions.from(provider.options); - this._notebookProxy.$updateNotebookProviderOptions(viewType, internalOptions); - }); - } - this._notebookProxy.$registerNotebookProvider( { id: extension.identifier, location: extension.extensionLocation }, viewType, @@ -173,7 +162,6 @@ export class ExtHostNotebookController implements ExtHostNotebookShape { ); return new extHostTypes.Disposable(() => { - listener?.dispose(); this._notebookContentProviders.delete(viewType); this._notebookProxy.$unregisterNotebookProvider(viewType); }); @@ -356,36 +344,6 @@ export class ExtHostNotebookController implements ExtHostNotebookShape { }); } - async $saveNotebook(viewType: string, uri: UriComponents, token: CancellationToken): Promise { - const document = this.getNotebookDocument(URI.revive(uri)); - const { provider } = this._getProviderData(viewType); - await provider.saveNotebook(document.apiNotebook, token); - return true; - } - - async $saveNotebookAs(viewType: string, uri: UriComponents, target: UriComponents, token: CancellationToken): Promise { - const document = this.getNotebookDocument(URI.revive(uri)); - const { provider } = this._getProviderData(viewType); - await provider.saveNotebookAs(URI.revive(target), document.apiNotebook, token); - return true; - } - - private _backupIdPool: number = 0; - - async $backupNotebook(viewType: string, uri: UriComponents, cancellation: CancellationToken): Promise { - const document = this.getNotebookDocument(URI.revive(uri)); - const provider = this._getProviderData(viewType); - - const storagePath = this._extensionStoragePaths.workspaceValue(provider.extension) ?? this._extensionStoragePaths.globalValue(provider.extension); - const fileName = String(hash([document.uri.toString(), this._backupIdPool++])); - const backupUri = URI.joinPath(storagePath, fileName); - - const backup = await provider.provider.backupNotebook(document.apiNotebook, { destination: backupUri }, cancellation); - document.updateBackup(backup); - return backup.id; - } - - private _createExtHostEditor(document: ExtHostNotebookDocument, editorId: string, data: INotebookEditorAddData) { if (this._editors.has(editorId)) { diff --git a/src/vs/workbench/api/common/extHostNotebookDocument.ts b/src/vs/workbench/api/common/extHostNotebookDocument.ts index 240ae6eede775..c3ebc53b3d6cb 100644 --- a/src/vs/workbench/api/common/extHostNotebookDocument.ts +++ b/src/vs/workbench/api/common/extHostNotebookDocument.ts @@ -141,7 +141,6 @@ export class ExtHostNotebookDocument { private _metadata: Record; private _versionId: number = 0; private _isDirty: boolean = false; - private _backup?: vscode.NotebookDocumentBackup; private _disposed: boolean = false; constructor( @@ -190,16 +189,6 @@ export class ExtHostNotebookDocument { return this._notebook; } - updateBackup(backup: vscode.NotebookDocumentBackup): void { - this._backup?.delete(); - this._backup = backup; - } - - disposeBackup(): void { - this._backup?.delete(); - this._backup = undefined; - } - acceptDocumentPropertiesChanged(data: extHostProtocol.INotebookDocumentPropertiesChangeData) { if (data.metadata) { this._metadata = Object.freeze({ ...this._metadata, ...data.metadata }); diff --git a/src/vs/workbench/api/test/browser/extHostNotebook.test.ts b/src/vs/workbench/api/test/browser/extHostNotebook.test.ts index c61334ba31677..09e785c307b25 100644 --- a/src/vs/workbench/api/test/browser/extHostNotebook.test.ts +++ b/src/vs/workbench/api/test/browser/extHostNotebook.test.ts @@ -19,8 +19,6 @@ import { ExtHostDocuments } from 'vs/workbench/api/common/extHostDocuments'; import { ExtHostCommands } from 'vs/workbench/api/common/extHostCommands'; import { nullExtensionDescription } from 'vs/workbench/services/extensions/common/extensions'; import { isEqual } from 'vs/base/common/resources'; -import { IExtensionStoragePaths } from 'vs/workbench/api/common/extHostStoragePaths'; -import { generateUuid } from 'vs/base/common/uuid'; import { Event } from 'vs/base/common/event'; import { ExtHostNotebookDocuments } from 'vs/workbench/api/common/extHostNotebookDocuments'; import { SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/common/proxyIdentifier'; @@ -54,12 +52,7 @@ suite('NotebookCell#Document', function () { }); extHostDocumentsAndEditors = new ExtHostDocumentsAndEditors(rpcProtocol, new NullLogService()); extHostDocuments = new ExtHostDocuments(rpcProtocol, extHostDocumentsAndEditors); - const extHostStoragePaths = new class extends mock() { - override workspaceValue() { - return URI.from({ scheme: 'test', path: generateUuid() }); - } - }; - extHostNotebooks = new ExtHostNotebookController(rpcProtocol, new ExtHostCommands(rpcProtocol, new NullLogService()), extHostDocumentsAndEditors, extHostDocuments, extHostStoragePaths); + extHostNotebooks = new ExtHostNotebookController(rpcProtocol, new ExtHostCommands(rpcProtocol, new NullLogService()), extHostDocumentsAndEditors, extHostDocuments); extHostNotebookDocuments = new ExtHostNotebookDocuments(extHostNotebooks); const reg = extHostNotebooks.registerNotebookContentProvider(nullExtensionDescription, 'test', new class extends mock() { diff --git a/src/vs/workbench/api/test/browser/extHostNotebookKernel.test.ts b/src/vs/workbench/api/test/browser/extHostNotebookKernel.test.ts index 54eb5519c6f97..d159691ba0353 100644 --- a/src/vs/workbench/api/test/browser/extHostNotebookKernel.test.ts +++ b/src/vs/workbench/api/test/browser/extHostNotebookKernel.test.ts @@ -7,7 +7,6 @@ import * as assert from 'assert'; import { Barrier } from 'vs/base/common/async'; import { DisposableStore } from 'vs/base/common/lifecycle'; import { URI, UriComponents } from 'vs/base/common/uri'; -import { generateUuid } from 'vs/base/common/uuid'; import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions'; import { NullLogService } from 'vs/platform/log/common/log'; import { ICellExecuteUpdateDto, ICellExecutionCompleteDto, INotebookKernelDto2, MainContext, MainThreadCommandsShape, MainThreadNotebookDocumentsShape, MainThreadNotebookKernelsShape, MainThreadNotebookShape } from 'vs/workbench/api/common/extHost.protocol'; @@ -19,7 +18,6 @@ import { ExtHostNotebookController } from 'vs/workbench/api/common/extHostNotebo import { ExtHostNotebookDocument } from 'vs/workbench/api/common/extHostNotebookDocument'; import { ExtHostNotebookDocuments } from 'vs/workbench/api/common/extHostNotebookDocuments'; import { ExtHostNotebookKernels } from 'vs/workbench/api/common/extHostNotebookKernels'; -import { IExtensionStoragePaths } from 'vs/workbench/api/common/extHostStoragePaths'; import { NotebookCellOutput, NotebookCellOutputItem } from 'vs/workbench/api/common/extHostTypes'; import { CellKind, CellUri, NotebookCellsChangeType } from 'vs/workbench/contrib/notebook/common/notebookCommon'; import { CellExecutionUpdateType } from 'vs/workbench/contrib/notebook/common/notebookExecutionService'; @@ -90,13 +88,8 @@ suite('NotebookKernel', function () { }); extHostDocumentsAndEditors = new ExtHostDocumentsAndEditors(rpcProtocol, new NullLogService()); extHostDocuments = new ExtHostDocuments(rpcProtocol, extHostDocumentsAndEditors); - const extHostStoragePaths = new class extends mock() { - override workspaceValue() { - return URI.from({ scheme: 'test', path: generateUuid() }); - } - }; extHostCommands = new ExtHostCommands(rpcProtocol, new NullLogService()); - extHostNotebooks = new ExtHostNotebookController(rpcProtocol, extHostCommands, extHostDocumentsAndEditors, extHostDocuments, extHostStoragePaths); + extHostNotebooks = new ExtHostNotebookController(rpcProtocol, extHostCommands, extHostDocumentsAndEditors, extHostDocuments); extHostNotebookDocuments = new ExtHostNotebookDocuments(extHostNotebooks); diff --git a/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts b/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts index e4d7aa3d2acfb..7f51e7a276cbc 100644 --- a/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts +++ b/src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts @@ -136,14 +136,6 @@ export class InteractiveDocumentContribution extends Disposable implements IWork transientOptions: contentOptions }; }, - save: async (uri: URI) => { - // trigger backup always - return false; - }, - saveAs: async (uri: URI, target: URI, token: CancellationToken) => { - // return this._proxy.$saveNotebookAs(viewType, uri, target, token); - return false; - }, backup: async (uri: URI, token: CancellationToken) => { const doc = notebookService.listNotebookDocuments().find(document => document.uri.toString() === uri.toString()); if (doc) { diff --git a/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts b/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts index 7cd345036a7a2..362123693b2dd 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts @@ -377,7 +377,7 @@ export class ComplexNotebookEditorModel extends EditorModel implements INotebook if (!this.isResolved()) { return; } - const success = await this._contentProvider.save(this.notebook.uri, CancellationToken.None); + const success = false; this._logService.debug(`[notebook editor model] save(${versionId}) - document saved saved, start updating file stats`, this.resource.toString(true), success); this._lastResolvedFileStat = await this._resolveStats(this.resource); if (success) { @@ -407,7 +407,7 @@ export class ComplexNotebookEditorModel extends EditorModel implements INotebook return undefined; } - const success = await this._contentProvider.saveAs(this.notebook.uri, targetResource, CancellationToken.None); + const success = false; this._logService.debug(`[notebook editor model] saveAs - document saved, start updating file stats`, this.resource.toString(true), success); this._lastResolvedFileStat = await this._resolveStats(this.resource); if (!success) { diff --git a/src/vs/workbench/contrib/notebook/common/notebookService.ts b/src/vs/workbench/contrib/notebook/common/notebookService.ts index 0c37ffe127c7f..f67d9be987dd9 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookService.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookService.ts @@ -22,8 +22,6 @@ export interface INotebookContentProvider { options: TransientOptions; open(uri: URI, backupId: string | VSBuffer | undefined, untitledDocumentData: VSBuffer | undefined, token: CancellationToken): Promise<{ data: NotebookData; transientOptions: TransientOptions }>; - save(uri: URI, token: CancellationToken): Promise; - saveAs(uri: URI, target: URI, token: CancellationToken): Promise; backup(uri: URI, token: CancellationToken): Promise; } diff --git a/src/vscode-dts/vscode.proposed.notebookContentProvider.d.ts b/src/vscode-dts/vscode.proposed.notebookContentProvider.d.ts index b1e9211ceb28e..d336c2ccf5415 100644 --- a/src/vscode-dts/vscode.proposed.notebookContentProvider.d.ts +++ b/src/vscode-dts/vscode.proposed.notebookContentProvider.d.ts @@ -7,29 +7,6 @@ declare module 'vscode' { // https://github.com/microsoft/vscode/issues/147248 - /** @deprecated */ - interface NotebookDocumentBackup { - /** - * Unique identifier for the backup. - * - * This id is passed back to your extension in `openNotebook` when opening a notebook editor from a backup. - */ - readonly id: string; - - /** - * Delete the current backup. - * - * This is called by the editor when it is clear the current backup is no longer needed, such as when a new backup - * is made or when the file is saved. - */ - delete(): void; - } - - /** @deprecated */ - interface NotebookDocumentBackupContext { - readonly destination: Uri; - } - /** @deprecated */ interface NotebookDocumentOpenContext { readonly backupId?: string; @@ -39,26 +16,13 @@ declare module 'vscode' { // todo@API use openNotebookDOCUMENT to align with openCustomDocument etc? // todo@API rename to NotebookDocumentContentProvider /** @deprecated */ - export interface NotebookContentProvider { - readonly options?: NotebookDocumentContentOptions; - readonly onDidChangeNotebookContentOptions?: Event; - /** * Content providers should always use {@link FileSystemProvider file system providers} to * resolve the raw content for `uri` as the resource is not necessarily a file on disk. */ openNotebook(uri: Uri, openContext: NotebookDocumentOpenContext, token: CancellationToken): NotebookData | Thenable; - - // todo@API use NotebookData instead - saveNotebook(document: NotebookDocument, token: CancellationToken): Thenable; - - // todo@API use NotebookData instead - saveNotebookAs(targetResource: Uri, document: NotebookDocument, token: CancellationToken): Thenable; - - // todo@API use NotebookData instead - backupNotebook(document: NotebookDocument, context: NotebookDocumentBackupContext, token: CancellationToken): Thenable; } export namespace workspace { diff --git a/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts b/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts index c78f1f7a3b709..986f7fac85c0f 100644 --- a/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts +++ b/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts @@ -14,8 +14,12 @@ declare module 'vscode' { } export namespace workspace { - // SPECIAL overload with NotebookRegistrationData + /** + * SPECIAL overload with NotebookRegistrationData + * @deprecated + */ export function registerNotebookContentProvider(notebookType: string, provider: NotebookContentProvider, options?: NotebookDocumentContentOptions, registrationData?: NotebookRegistrationData): Disposable; + // SPECIAL overload with NotebookRegistrationData export function registerNotebookSerializer(notebookType: string, serializer: NotebookSerializer, options?: NotebookDocumentContentOptions, registration?: NotebookRegistrationData): Disposable; }