From bd2bdf2f2f317bf1edcdc8f57093b359c70276c4 Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Fri, 31 Jul 2020 16:56:38 -0400 Subject: [PATCH] Support quickpick on open anyways (#103712) --- .../files/browser/editors/binaryFileEditor.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.ts b/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.ts index 389bcae9802..1daf1517449 100644 --- a/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.ts +++ b/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.ts @@ -14,6 +14,9 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic import { IStorageService } from 'vs/platform/storage/common/storage'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IOpenerService } from 'vs/platform/opener/common/opener'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput'; +import { openEditorWith } from 'vs/workbench/services/editor/common/editorOpenWith'; /** * An implementation of editor for binary files that cannot be displayed. @@ -27,6 +30,8 @@ export class BinaryFileEditor extends BaseBinaryResourceEditor { @IThemeService themeService: IThemeService, @IOpenerService private readonly openerService: IOpenerService, @IEditorService private readonly editorService: IEditorService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IQuickInputService private readonly quickInputService: IQuickInputService, @IStorageService storageService: IStorageService, @IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService, ) { @@ -46,8 +51,11 @@ export class BinaryFileEditor extends BaseBinaryResourceEditor { private async openInternal(input: EditorInput, options: EditorOptions | undefined): Promise { if (input instanceof FileEditorInput) { input.setForceOpenAsText(); - - await this.editorService.openEditor(input, options, this.group); + if (this.group !== undefined) { + await openEditorWith(input, undefined, options, this.group, this.editorService, this.configurationService, this.quickInputService); + } else { + await this.editorService.openEditor(input, options, this.group); + } } }