proper name for register function: registerFileDecorationProvider, #54938
This commit is contained in:
parent
a36c68b9ec
commit
d04f3178dc
5 changed files with 8 additions and 8 deletions
|
@ -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<FileDecoration | undefined> {
|
||||
|
@ -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)
|
||||
);
|
||||
}
|
||||
|
|
2
src/vs/vscode.proposed.d.ts
vendored
2
src/vs/vscode.proposed.d.ts
vendored
|
@ -801,7 +801,7 @@ declare module 'vscode' {
|
|||
}
|
||||
|
||||
export namespace window {
|
||||
export function registerDecorationProvider(provider: FileDecorationProvider): Disposable;
|
||||
export function registerFileDecorationProvider(provider: FileDecorationProvider): Disposable;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue