Make createEditorInput async (#20038)

This commit is contained in:
Charles Gagnon
2022-07-14 19:39:52 -07:00
committed by GitHub
parent ada87478a7
commit ba1f4db745
9 changed files with 25 additions and 24 deletions

View File

@@ -782,15 +782,15 @@ export class NotebookEditorOverrideContribution extends Disposable implements IW
priority: RegisteredEditorPriority.builtin
},
{},
(editorInput, group) => {
const fileInput = this._editorService.createEditorInput(editorInput) as FileEditorInput;
async (editorInput, group) => {
const fileInput = await this._editorService.createEditorInput(editorInput) as FileEditorInput;
// Try to convert the input, falling back to just a plain file input if we're unable to
const newInput = this.convertInput(fileInput);
return { editor: newInput, options: editorInput.options, group: group };
},
undefined,
(diffEditorInput, group) => {
const diffEditorInputImpl = this._editorService.createEditorInput(diffEditorInput) as DiffEditorInput;
async (diffEditorInput, group) => {
const diffEditorInputImpl = await this._editorService.createEditorInput(diffEditorInput) as DiffEditorInput;
// Try to convert the input, falling back to the original input if we're unable to
const newInput = this.convertInput(diffEditorInputImpl);
return { editor: newInput, options: diffEditorInput.options, group: group };