fix issue with profiler and table designer editor (#18059)

This commit is contained in:
Alan Ren
2022-01-12 15:43:41 -08:00
committed by GitHub
parent 2b2193b387
commit 4add341c86
2 changed files with 6 additions and 2 deletions

View File

@@ -33,6 +33,8 @@ import { onUnexpectedError } from 'vs/base/common/errors';
class DesignerCodeEditor extends CodeEditorWidget {
}
let DesignerScriptEditorInstanceId = 0;
export class DesignerScriptEditor extends BaseTextEditor implements DesignerTextEditor {
private _content: string;
private _contentChangeEventEmitter: Emitter<string> = new Emitter<string>();
@@ -57,7 +59,7 @@ export class DesignerScriptEditor extends BaseTextEditor implements DesignerText
super(DesignerScriptEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, editorService, editorGroupService);
this.create(this._container);
this.setVisible(true);
this._untitledTextEditorModel = this.instantiationService.createInstance(UntitledTextEditorModel, URI.from({ scheme: Schemas.untitled }), false, undefined, 'sql', undefined);
this._untitledTextEditorModel = this.instantiationService.createInstance(UntitledTextEditorModel, URI.from({ scheme: Schemas.untitled, path: `DesignerScriptEditor-${DesignerScriptEditorInstanceId++}` }), false, undefined, 'sql', undefined);
this._editorInput = this.instantiationService.createInstance(UntitledTextEditorInput, this._untitledTextEditorModel);
this.setInput(this._editorInput, undefined, undefined).catch(onUnexpectedError);
this._editorInput.resolve().then((model) => {