Keybinding for Show SQL Pane (#9750)

* WIP registerKeybind

* testing command

* Moved command to query.contribution

* Moved command to editData.contribution

* simplified command

* more simplification

* Working keybind for toggle query pane added.

* removed space

* added option to always show sql pane

* removed keybind default and changed option
This commit is contained in:
Alex Ma
2020-05-14 14:06:58 -07:00
committed by GitHub
parent e3218ade02
commit 8f7861deac
3 changed files with 42 additions and 1 deletions

View File

@@ -62,7 +62,6 @@ export class QueryEditorService implements IQueryEditorService {
const queryResultsInput: QueryResultsInput = this._instantiationService.createInstance(QueryResultsInput, docUri.toString());
let queryInput = this._instantiationService.createInstance(UntitledQueryEditorInput, options.description, fileInput, queryResultsInput);
if (options.open) {
await this._editorService.openEditor(queryInput, { pinned: true });
}
@@ -88,6 +87,8 @@ export class QueryEditorService implements IQueryEditorService {
// 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);
// Determine whether to show edit data upon opening.
editDataInput.queryPaneEnabled = this._configurationService.getValue('editor.showEditDataSqlPaneOnStartup');
if (sqlContent) {
//Setting the value of the textEditorModel to sqlContent marks editor as dirty, editDataInput handles it.
m.textEditorModel.setValue(sqlContent);