run the whole thing instead of current statement (#6757)

* run the whole thing instead of current statement

* backward compact
This commit is contained in:
Alan Ren
2019-08-15 13:43:08 -07:00
committed by GitHub
parent d4d11aa260
commit 314bd0e212
5 changed files with 14 additions and 8 deletions

View File

@@ -67,13 +67,17 @@ export class MainThreadQueryEditor implements MainThreadQueryEditorShape {
});
}
public $runQuery(fileUri: string): void {
public $runQuery(fileUri: string, runCurrentQuery: boolean = true): void {
let filteredEditors = this._editorService.visibleControls.filter(editor => editor.input.getResource().toString() === fileUri);
if (filteredEditors && filteredEditors.length > 0) {
let editor = filteredEditors[0];
if (editor instanceof QueryEditor) {
let queryEditor: QueryEditor = editor;
queryEditor.runCurrentQuery();
if (runCurrentQuery) {
queryEditor.runCurrentQuery();
} else {
queryEditor.runQuery();
}
}
}
}