#4363: Reopen notebook editors when ADS launched (#4424)

* #4363: Reopen notebook editors when ADS launched

* Code review changes
This commit is contained in:
Raj
2019-03-12 23:02:37 -07:00
committed by GitHub
parent b495fb7a37
commit ebd187ec06
5 changed files with 30 additions and 15 deletions

View File

@@ -528,10 +528,10 @@ export class EditorService extends Disposable implements EditorServiceImpl {
if (!untitledInput.resource || typeof untitledInput.filePath === 'string' || (untitledInput.resource instanceof URI && untitledInput.resource.scheme === Schemas.untitled)) {
// {{SQL CARBON EDIT}}
let mode: string = getFileMode( this.instantiationService, untitledInput.resource);
let modeId: string = untitledInput.language ? untitledInput.language : getFileMode( this.instantiationService, untitledInput.resource);
return convertEditorInput(this.untitledEditorService.createOrGet(
untitledInput.filePath ? URI.file(untitledInput.filePath) : untitledInput.resource,
mode,
modeId,
untitledInput.contents,
untitledInput.encoding
), undefined, this.instantiationService);