mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 09:35:39 -05:00
Adds toggle button to switch between estimated and actual execution plans (#19629)
* Creates toggle button to switch between estimate and actual query plans * Renames ID for the toggleActualExecutionPlanModeAction class * Renames button back to explain * Creating actual execution plans resembles SSMS * Adds CTRL/CMD + L shortcut to display estimated execution plans * Alphabetically organizes telemetry actions * Adds telemetry when the setting for actual execution plan toggle is used * Resolves build errors * Fixes broken unit tests. * Code review changes * Removes unnecessary null-coalescing operator. * Creates placeholder icons for actual execution plans enabled * Code review changes * Shortens label names * Telemetry moved to toggle button * Telemetry review changes * Clarifies misleading label
This commit is contained in:
@@ -206,6 +206,27 @@ export class CopyQueryWithResultsKeyboardAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
export class EstimatedExecutionPlanKeyboardAction extends Action {
|
||||
public static ID = 'estimatedExecutionPlanKeyboardAction';
|
||||
public static LABEL = nls.localize('estimatedExecutionPlanKeyboardAction', "Display Estimated Execution Plan");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
label: string,
|
||||
@IEditorService private _editorService: IEditorService
|
||||
) {
|
||||
super(id, label);
|
||||
this.enabled = true;
|
||||
}
|
||||
|
||||
public override async run(): Promise<void> {
|
||||
const editor = this._editorService.activeEditorPane;
|
||||
if (editor instanceof QueryEditor) {
|
||||
editor.input.runQuery(editor.getSelection(), { displayEstimatedQueryPlan: true });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class RunCurrentQueryWithActualPlanKeyboardAction extends Action {
|
||||
public static ID = 'runCurrentQueryWithActualPlanKeyboardAction';
|
||||
public static LABEL = nls.localize('runCurrentQueryWithActualPlanKeyboardAction', "Run Current Query with Actual Plan");
|
||||
|
||||
Reference in New Issue
Block a user