mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
force the isDirty flag to always be false (#10295)
This commit is contained in:
@@ -120,6 +120,7 @@ export interface IDetailData {
|
|||||||
export class ProfilerEditor extends BaseEditor {
|
export class ProfilerEditor extends BaseEditor {
|
||||||
public static readonly ID: string = 'workbench.editor.profiler';
|
public static readonly ID: string = 'workbench.editor.profiler';
|
||||||
|
|
||||||
|
private _untitledTextEditorModel: UntitledTextEditorModel;
|
||||||
private _editor: ProfilerResourceEditor;
|
private _editor: ProfilerResourceEditor;
|
||||||
private _editorModel: ITextModel;
|
private _editorModel: ITextModel;
|
||||||
private _editorInput: UntitledTextEditorInput;
|
private _editorInput: UntitledTextEditorInput;
|
||||||
@@ -319,6 +320,7 @@ export class ProfilerEditor extends BaseEditor {
|
|||||||
let data = this.input.data.getItem(args.rows[0]);
|
let data = this.input.data.getItem(args.rows[0]);
|
||||||
if (data) {
|
if (data) {
|
||||||
this._modelService.updateModel(this._editorModel, data['TextData']);
|
this._modelService.updateModel(this._editorModel, data['TextData']);
|
||||||
|
this._untitledTextEditorModel.setDirty(false);
|
||||||
this._detailTableData.clear();
|
this._detailTableData.clear();
|
||||||
this._detailTableData.push(Object.keys(data).filter(key => {
|
this._detailTableData.push(Object.keys(data).filter(key => {
|
||||||
return data[key] !== ' ';
|
return data[key] !== ' ';
|
||||||
@@ -436,8 +438,8 @@ export class ProfilerEditor extends BaseEditor {
|
|||||||
editorContainer.className = 'profiler-editor';
|
editorContainer.className = 'profiler-editor';
|
||||||
this._editor.create(editorContainer);
|
this._editor.create(editorContainer);
|
||||||
this._editor.setVisible(true);
|
this._editor.setVisible(true);
|
||||||
const model = this._instantiationService.createInstance(UntitledTextEditorModel, URI.from({ scheme: Schemas.untitled }), false, undefined, 'sql', undefined);
|
this._untitledTextEditorModel = this._instantiationService.createInstance(UntitledTextEditorModel, URI.from({ scheme: Schemas.untitled }), false, undefined, 'sql', undefined);
|
||||||
this._editorInput = this._instantiationService.createInstance(UntitledTextEditorInput, model);
|
this._editorInput = this._instantiationService.createInstance(UntitledTextEditorInput, this._untitledTextEditorModel);
|
||||||
this._editor.setInput(this._editorInput, undefined);
|
this._editor.setInput(this._editorInput, undefined);
|
||||||
this._editorInput.resolve().then(model => this._editorModel = model.textEditorModel);
|
this._editorInput.resolve().then(model => this._editorModel = model.textEditorModel);
|
||||||
return editorContainer;
|
return editorContainer;
|
||||||
|
|||||||
Reference in New Issue
Block a user