mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 01:25:37 -05:00
Fix for SQL text file for editdata upon reload. (#8947)
* set dirty for editdata to false (prevent backup) * small wording change * Temporary fix for issue * using proper fix * Used editInputData onDidChangeDirty * Moved all code to editDataInput * Implemented fix from notebooks into editdata. * Fix for unregistering copy service * Fix in QueryEditorService * add handling in case of changes made while editing * Small optimization, removed setdirty in sql check * moved onDidChangeDirty to EditDataInput * some text changes * small fix for consistency in slickColorTheme
This commit is contained in:
@@ -87,16 +87,15 @@ export class QueryEditorService implements IQueryEditorService {
|
||||
let docUri: URI = URI.from({ scheme: Schemas.untitled, path: filePath });
|
||||
|
||||
// Create a sql document pane with accoutrements
|
||||
const fileInput = this._untitledEditorService.create({ associatedResource: docUri, mode: 'sql' });
|
||||
const fileInput = this._untitledEditorService.create({ untitledResource: docUri, mode: 'sql' });
|
||||
const m = await fileInput.resolve();
|
||||
if (sqlContent) {
|
||||
m.textEditorModel.setValue(sqlContent);
|
||||
}
|
||||
|
||||
// Create an EditDataInput for editing
|
||||
const resultsInput: EditDataResultsInput = this._instantiationService.createInstance(EditDataResultsInput, docUri.toString());
|
||||
let editDataInput: EditDataInput = this._instantiationService.createInstance(EditDataInput, docUri, schemaName, tableName, fileInput, sqlContent, resultsInput);
|
||||
|
||||
if (sqlContent) {
|
||||
//Setting the value of the textEditorModel to sqlContent marks editor as dirty, editDataInput handles it.
|
||||
m.textEditorModel.setValue(sqlContent);
|
||||
}
|
||||
const editor = await this._editorService.openEditor(editDataInput, { pinned: true });
|
||||
let params = editor.input as EditDataInput;
|
||||
return params;
|
||||
|
||||
Reference in New Issue
Block a user