mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
Actual Execution Plan No Longer Executes Queries (#19840)
* Ctrl/Cmd + m, no longer executes queries. * Adjusts command label * Code review changes * Uses category parameter to categorize actual plan command * Actual execution plan command label matches estimated plan command label * Revert "Actual execution plan command label matches estimated plan command label" This reverts commit 15f301dfc64341d631ca5e9b1314d8cf739b2088. * Centralizes localized category string (#19857) * Actual Plan action uses centralized category
This commit is contained in:
@@ -227,9 +227,9 @@ export class EstimatedExecutionPlanKeyboardAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
export class RunCurrentQueryWithActualPlanKeyboardAction extends Action {
|
||||
public static ID = 'runCurrentQueryWithActualPlanKeyboardAction';
|
||||
public static LABEL = nls.localize('runCurrentQueryWithActualPlanKeyboardAction', "Run Current Query with Actual Plan");
|
||||
export class ToggleActualPlanKeyboardAction extends Action {
|
||||
public static ID = 'ToggleActualPlanKeyboardAction';
|
||||
public static LABEL = nls.localize('ToggleActualPlanKeyboardAction', "Enable/Disable Actual Execution Plan");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -242,9 +242,12 @@ export class RunCurrentQueryWithActualPlanKeyboardAction extends Action {
|
||||
|
||||
public override run(): Promise<void> {
|
||||
const editor = this._editorService.activeEditorPane;
|
||||
|
||||
if (editor instanceof QueryEditor) {
|
||||
editor.runCurrentQueryWithActualPlan();
|
||||
let toActualPlanState = !editor.input.state.isActualExecutionPlanMode;
|
||||
editor.input.state.isActualExecutionPlanMode = toActualPlanState;
|
||||
}
|
||||
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import { QueryResultsInput } from 'sql/workbench/common/editor/query/queryResult
|
||||
import * as queryContext from 'sql/workbench/contrib/query/common/queryContext';
|
||||
import {
|
||||
RunQueryKeyboardAction, RunCurrentQueryKeyboardAction, CancelQueryKeyboardAction, RefreshIntellisenseKeyboardAction, ToggleQueryResultsKeyboardAction,
|
||||
RunQueryShortcutAction, RunCurrentQueryWithActualPlanKeyboardAction, CopyQueryWithResultsKeyboardAction, FocusOnCurrentQueryKeyboardAction, ParseSyntaxAction, ToggleFocusBetweenQueryEditorAndResultsAction, EstimatedExecutionPlanKeyboardAction
|
||||
RunQueryShortcutAction, ToggleActualPlanKeyboardAction, CopyQueryWithResultsKeyboardAction, FocusOnCurrentQueryKeyboardAction, ParseSyntaxAction, ToggleFocusBetweenQueryEditorAndResultsAction, EstimatedExecutionPlanKeyboardAction
|
||||
} from 'sql/workbench/contrib/query/browser/keyboardQueryActions';
|
||||
import * as gridActions from 'sql/workbench/contrib/editData/browser/gridActions';
|
||||
import * as gridCommands from 'sql/workbench/contrib/editData/browser/gridCommands';
|
||||
@@ -148,12 +148,13 @@ actionRegistry.registerWorkbenchAction(
|
||||
|
||||
actionRegistry.registerWorkbenchAction(
|
||||
SyncActionDescriptor.create(
|
||||
RunCurrentQueryWithActualPlanKeyboardAction,
|
||||
RunCurrentQueryWithActualPlanKeyboardAction.ID,
|
||||
RunCurrentQueryWithActualPlanKeyboardAction.LABEL,
|
||||
ToggleActualPlanKeyboardAction,
|
||||
ToggleActualPlanKeyboardAction.ID,
|
||||
ToggleActualPlanKeyboardAction.LABEL,
|
||||
{ primary: KeyMod.CtrlCmd | KeyCode.KEY_M }
|
||||
),
|
||||
RunCurrentQueryWithActualPlanKeyboardAction.LABEL
|
||||
ToggleActualPlanKeyboardAction.LABEL,
|
||||
CATEGORIES.ExecutionPlan.value
|
||||
);
|
||||
|
||||
actionRegistry.registerWorkbenchAction(
|
||||
|
||||
Reference in New Issue
Block a user