From 9ef6bec960f415b2dc2bf96ccff3f60560448169 Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Tue, 26 Nov 2019 10:40:22 -0800 Subject: [PATCH] add back in listen for run query (#8481) --- .../workbench/contrib/query/common/queryEditorInput.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sql/workbench/contrib/query/common/queryEditorInput.ts b/src/sql/workbench/contrib/query/common/queryEditorInput.ts index ffcd0dd530..44b4c2f8e2 100644 --- a/src/sql/workbench/contrib/query/common/queryEditorInput.ts +++ b/src/sql/workbench/contrib/query/common/queryEditorInput.ts @@ -133,6 +133,14 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab this._text.onDidChangeDirty(() => this._onDidChangeDirty.fire()); + this._register( + this.queryModelService.onRunQueryStart(uri => { + if (this.uri === uri) { + this.onRunQuery(); + } + }) + ); + this._register( this.queryModelService.onRunQueryComplete(uri => { if (this.uri === uri) { @@ -153,6 +161,8 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab } })); + this.connectionManagementService.ensureDefaultLanguageFlavor(this.uri); + this.onDisconnect(); this.onQueryComplete(); }