From ea8948afa9b601472cb99d666e70c126686826cc Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 19 Nov 2020 08:13:18 +0100 Subject: [PATCH] proper name for register function: registerFileDecorationProvider, #54938 --- extensions/git/src/decorationProvider.ts | 4 ++-- src/vs/vscode.proposed.d.ts | 2 +- src/vs/workbench/api/common/extHost.api.impl.ts | 4 ++-- src/vs/workbench/api/common/extHostDecorations.ts | 2 +- src/vs/workbench/test/browser/api/extHostDecorations.test.ts | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extensions/git/src/decorationProvider.ts b/extensions/git/src/decorationProvider.ts index 1eb2faab464ca..63c0260519232 100644 --- a/extensions/git/src/decorationProvider.ts +++ b/extensions/git/src/decorationProvider.ts @@ -26,7 +26,7 @@ class GitIgnoreDecorationProvider implements FileDecorationProvider { model.onDidCloseRepository )); - this.disposables.push(window.registerDecorationProvider(this)); + this.disposables.push(window.registerFileDecorationProvider(this)); } async provideFileDecoration(uri: Uri): Promise { @@ -100,7 +100,7 @@ class GitDecorationProvider implements FileDecorationProvider { constructor(private repository: Repository) { this.disposables.push( - window.registerDecorationProvider(this), + window.registerFileDecorationProvider(this), repository.onDidRunGitStatus(this.onDidRunGitStatus, this) ); } diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 443a485a31edc..deea6fc582648 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -801,7 +801,7 @@ declare module 'vscode' { } export namespace window { - export function registerDecorationProvider(provider: FileDecorationProvider): Disposable; + export function registerFileDecorationProvider(provider: FileDecorationProvider): Disposable; } //#endregion diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 42f167a6cd7ab..e4eee8822f693 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -617,9 +617,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I registerCustomEditorProvider: (viewType: string, provider: vscode.CustomTextEditorProvider | vscode.CustomReadonlyEditorProvider, options: { webviewOptions?: vscode.WebviewPanelOptions, supportsMultipleEditorsPerDocument?: boolean } = {}) => { return extHostCustomEditors.registerCustomEditorProvider(extension, viewType, provider, options); }, - registerDecorationProvider(provider: vscode.FileDecorationProvider) { + registerFileDecorationProvider(provider: vscode.FileDecorationProvider) { checkProposedApiEnabled(extension); - return extHostDecorations.registerDecorationProvider(provider, extension.identifier); + return extHostDecorations.registerFileDecorationProvider(provider, extension.identifier); }, registerUriHandler(handler: vscode.UriHandler) { return extHostUrls.registerUriHandler(extension.identifier, handler); diff --git a/src/vs/workbench/api/common/extHostDecorations.ts b/src/vs/workbench/api/common/extHostDecorations.ts index 39d293dee18ee..ea4858374acb1 100644 --- a/src/vs/workbench/api/common/extHostDecorations.ts +++ b/src/vs/workbench/api/common/extHostDecorations.ts @@ -37,7 +37,7 @@ export class ExtHostDecorations implements ExtHostDecorationsShape { this._proxy = extHostRpc.getProxy(MainContext.MainThreadDecorations); } - registerDecorationProvider(provider: vscode.FileDecorationProvider, extensionId: ExtensionIdentifier): vscode.Disposable { + registerFileDecorationProvider(provider: vscode.FileDecorationProvider, extensionId: ExtensionIdentifier): vscode.Disposable { const handle = ExtHostDecorations._handlePool++; this._provider.set(handle, { provider, extensionId }); this._proxy.$registerDecorationProvider(handle, extensionId.value); diff --git a/src/vs/workbench/test/browser/api/extHostDecorations.test.ts b/src/vs/workbench/test/browser/api/extHostDecorations.test.ts index 7f5c9f3628753..4e78842c7662e 100644 --- a/src/vs/workbench/test/browser/api/extHostDecorations.test.ts +++ b/src/vs/workbench/test/browser/api/extHostDecorations.test.ts @@ -46,7 +46,7 @@ suite('ExtHostDecorations', function () { let calledB = false; // never returns - extHostDecorations.registerDecorationProvider({ + extHostDecorations.registerFileDecorationProvider({ provideFileDecoration() { calledA = true; @@ -55,7 +55,7 @@ suite('ExtHostDecorations', function () { }, nullExtensionDescription.identifier); // always returns - extHostDecorations.registerDecorationProvider({ + extHostDecorations.registerFileDecorationProvider({ provideFileDecoration() { calledB = true;