Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark notebookContentProvider proposal as deprecated #150493

Merged
merged 1 commit into from
May 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/vs/workbench/api/common/extHost.api.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
},
registerNotebookContentProvider: (viewType: string, provider: vscode.NotebookContentProvider, options?: vscode.NotebookDocumentContentOptions, registration?: vscode.NotebookRegistrationData) => {
checkProposedApiEnabled(extension, 'notebookContentProvider');

extHostApiDeprecation.report('workspace.registerNotebookContentProvider', extension,
`The notebookContentProvider API is not on track for finalization and will be removed.`);

return extHostNotebook.registerNotebookContentProvider(extension, viewType, provider, options, isProposedApiEnabled(extension, 'notebookLiveShare') ? registration : undefined);
},
onDidChangeConfiguration: (listener: (_: any) => any, thisArgs?: any, disposables?: extHostTypes.Disposable[]) => {
Expand Down
8 changes: 7 additions & 1 deletion src/vscode-dts/vscode.proposed.notebookContentProvider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

declare module 'vscode' {

// https://github.com/microsoft/vscode/issues/106744
// https://github.com/microsoft/vscode/issues/147248

/** @deprecated */
interface NotebookDocumentBackup {
/**
* Unique identifier for the backup.
Expand All @@ -24,17 +25,21 @@ declare module 'vscode' {
delete(): void;
}

/** @deprecated */
interface NotebookDocumentBackupContext {
readonly destination: Uri;
}

/** @deprecated */
interface NotebookDocumentOpenContext {
readonly backupId?: string;
readonly untitledDocumentData?: Uint8Array;
}

// todo@API use openNotebookDOCUMENT to align with openCustomDocument etc?
// todo@API rename to NotebookDocumentContentProvider
/** @deprecated */

export interface NotebookContentProvider {

readonly options?: NotebookDocumentContentOptions;
Expand All @@ -60,6 +65,7 @@ declare module 'vscode' {

// TODO@api use NotebookDocumentFilter instead of just notebookType:string?
// TODO@API options duplicates the more powerful variant on NotebookContentProvider
/** @deprecated */
export function registerNotebookContentProvider(notebookType: string, provider: NotebookContentProvider, options?: NotebookDocumentContentOptions): Disposable;
}
}