未验证 提交 bd2bdf2f 编写于 作者: L Logan Ramos 提交者: GitHub

Support quickpick on open anyways (#103712)

上级 c50887a0
...@@ -14,6 +14,9 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic ...@@ -14,6 +14,9 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
import { IStorageService } from 'vs/platform/storage/common/storage'; import { IStorageService } from 'vs/platform/storage/common/storage';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { IOpenerService } from 'vs/platform/opener/common/opener'; 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. * An implementation of editor for binary files that cannot be displayed.
...@@ -27,6 +30,8 @@ export class BinaryFileEditor extends BaseBinaryResourceEditor { ...@@ -27,6 +30,8 @@ export class BinaryFileEditor extends BaseBinaryResourceEditor {
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@IOpenerService private readonly openerService: IOpenerService, @IOpenerService private readonly openerService: IOpenerService,
@IEditorService private readonly editorService: IEditorService, @IEditorService private readonly editorService: IEditorService,
@IConfigurationService private readonly configurationService: IConfigurationService,
@IQuickInputService private readonly quickInputService: IQuickInputService,
@IStorageService storageService: IStorageService, @IStorageService storageService: IStorageService,
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService, @IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService,
) { ) {
...@@ -46,8 +51,11 @@ export class BinaryFileEditor extends BaseBinaryResourceEditor { ...@@ -46,8 +51,11 @@ export class BinaryFileEditor extends BaseBinaryResourceEditor {
private async openInternal(input: EditorInput, options: EditorOptions | undefined): Promise<void> { private async openInternal(input: EditorInput, options: EditorOptions | undefined): Promise<void> {
if (input instanceof FileEditorInput) { if (input instanceof FileEditorInput) {
input.setForceOpenAsText(); input.setForceOpenAsText();
if (this.group !== undefined) {
await this.editorService.openEditor(input, options, this.group); await openEditorWith(input, undefined, options, this.group, this.editorService, this.configurationService, this.quickInputService);
} else {
await this.editorService.openEditor(input, options, this.group);
}
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册