mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 01:25:36 -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:
@@ -41,6 +41,7 @@ export interface IQueryEditorStateChange {
|
||||
executingChange?: boolean;
|
||||
connectingChange?: boolean;
|
||||
sqlCmdModeChanged?: boolean;
|
||||
actualExecutionPlanModeChanged?: boolean;
|
||||
}
|
||||
|
||||
export class QueryEditorState extends Disposable {
|
||||
@@ -49,6 +50,7 @@ export class QueryEditorState extends Disposable {
|
||||
private _resultsVisible = false;
|
||||
private _executing = false;
|
||||
private _connecting = false;
|
||||
private _isActualExecutionPlanMode = false;
|
||||
|
||||
private _onChange = this._register(new Emitter<IQueryEditorStateChange>());
|
||||
public onChange = this._onChange.event;
|
||||
@@ -108,12 +110,24 @@ export class QueryEditorState extends Disposable {
|
||||
return this._isSqlCmdMode;
|
||||
}
|
||||
|
||||
public set isActualExecutionPlanMode(val: boolean) {
|
||||
if (val !== this._isActualExecutionPlanMode) {
|
||||
this._isActualExecutionPlanMode = val;
|
||||
this._onChange.fire({ actualExecutionPlanModeChanged: true });
|
||||
}
|
||||
}
|
||||
|
||||
public get isActualExecutionPlanMode() {
|
||||
return this._isActualExecutionPlanMode;
|
||||
}
|
||||
|
||||
public setState(newState: QueryEditorState): void {
|
||||
this.connected = newState.connected;
|
||||
this.connecting = newState.connecting;
|
||||
this.resultsVisible = newState.resultsVisible;
|
||||
this.executing = newState.executing;
|
||||
this.isSqlCmdMode = newState.isSqlCmdMode;
|
||||
this.isActualExecutionPlanMode = newState.isActualExecutionPlanMode;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user