mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 01:25:36 -05:00
toggle focus between query and results (#13928)
* toggle focus between query and results * focus on tab * comments
This commit is contained in:
@@ -306,6 +306,32 @@ export class ToggleQueryResultsKeyboardAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Toggle the focus between query editor and results pane
|
||||
*/
|
||||
export class ToggleFocusBetweenQueryEditorAndResultsAction extends Action {
|
||||
public static ID = 'ToggleFocusBetweenQueryEditorAndResultsAction';
|
||||
public static LABEL = nls.localize('ToggleFocusBetweenQueryEditorAndResultsAction', "Toggle Focus Between Query And Results");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
label: string,
|
||||
@IEditorService private _editorService: IEditorService
|
||||
) {
|
||||
super(id, label);
|
||||
this.enabled = true;
|
||||
}
|
||||
|
||||
public async run(): Promise<void> {
|
||||
const editor = this._editorService.activeEditorPane;
|
||||
if (editor instanceof QueryEditor) {
|
||||
editor.toggleFocusBetweenQueryEditorAndResults();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Action class that runs a query in the active SQL text document.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user