debt - loadOrCreate => resolve

This commit is contained in:
Benjamin Pasero
2020-01-16 15:38:03 +01:00
parent 5e6d6f7105
commit 664836ec0e
17 changed files with 35 additions and 35 deletions

View File

@@ -216,7 +216,7 @@ export class MainThreadDocuments implements MainThreadDocumentsShape {
}
private _doCreateUntitled(resource?: URI, mode?: string, initialValue?: string): Promise<URI> {
return this._textFileService.untitled.loadOrCreate({
return this._textFileService.untitled.resolve({
resource,
mode,
initialValue,

View File

@@ -309,7 +309,7 @@ export class MainThreadWebviews extends Disposable implements extHostProtocol.Ma
}
private async retainCustomEditorModel(webviewInput: WebviewInput, resource: URI, viewType: string, capabilities: readonly extHostProtocol.WebviewEditorCapabilities[]) {
const model = await this._customEditorService.models.loadOrCreate(webviewInput.getResource(), webviewInput.viewType);
const model = await this._customEditorService.models.resolve(webviewInput.getResource(), webviewInput.viewType);
const existingEntry = this._customEditorModels.get(model);
if (existingEntry) {