From a1578dc53c37187d214295216647b6f022f2e5f8 Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Thu, 4 Apr 2024 11:40:01 -0700 Subject: [PATCH] debug: add some command descriptions For #209511 --- .../debug/browser/debugEditorActions.ts | 3 ++ .../contrib/debug/browser/debugViewlet.ts | 3 ++ .../workbench/contrib/debug/browser/repl.ts | 3 ++ .../testing/browser/testExplorerActions.ts | 30 +++++++++---------- .../testing/browser/testingOutputPeek.ts | 11 ++++++- 5 files changed, 34 insertions(+), 16 deletions(-) diff --git a/src/vs/workbench/contrib/debug/browser/debugEditorActions.ts b/src/vs/workbench/contrib/debug/browser/debugEditorActions.ts index 2dd7760e49207..7810995bb38b2 100644 --- a/src/vs/workbench/contrib/debug/browser/debugEditorActions.ts +++ b/src/vs/workbench/contrib/debug/browser/debugEditorActions.ts @@ -276,6 +276,9 @@ class ToggleDisassemblyViewSourceCodeAction extends Action2 { ...nls.localize2('toggleDisassemblyViewSourceCode', "Toggle Source Code in Disassembly View"), mnemonicTitle: nls.localize({ key: 'mitogglesource', comment: ['&& denotes a mnemonic'] }, "&&ToggleSource"), }, + metadata: { + description: nls.localize2('toggleDisassemblyViewSourceCodeDescription', 'Shows or hides source code in disassembly') + }, f1: true, }); } diff --git a/src/vs/workbench/contrib/debug/browser/debugViewlet.ts b/src/vs/workbench/contrib/debug/browser/debugViewlet.ts index 6a51b8f273ae5..f76fda301fd42 100644 --- a/src/vs/workbench/contrib/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/contrib/debug/browser/debugViewlet.ts @@ -197,6 +197,9 @@ registerAction2(class extends Action2 { original: 'Open \'launch.json\'', mnemonicTitle: nls.localize({ key: 'miOpenConfigurations', comment: ['&& denotes a mnemonic'] }, "Open &&Configurations") }, + metadata: { + description: nls.localize2('openLaunchConfigDescription', 'Opens the file used to configure how your program is debugged') + }, f1: true, icon: debugConfigure, precondition: CONTEXT_DEBUG_UX.notEqualsTo('simple'), diff --git a/src/vs/workbench/contrib/debug/browser/repl.ts b/src/vs/workbench/contrib/debug/browser/repl.ts index b3b81ec683212..927813b014d09 100644 --- a/src/vs/workbench/contrib/debug/browser/repl.ts +++ b/src/vs/workbench/contrib/debug/browser/repl.ts @@ -976,6 +976,9 @@ registerAction2(class extends ViewAction { id: 'workbench.debug.panel.action.clearReplAction', viewId: REPL_VIEW_ID, title: localize2('clearRepl', 'Clear Console'), + metadata: { + description: localize2('clearRepl.descriotion', 'Clears all program output from your debug REPL') + }, f1: true, icon: debugConsoleClearAll, menu: [{ diff --git a/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts b/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts index 103efb04a9cbd..6851abd333bdd 100644 --- a/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts +++ b/src/vs/workbench/contrib/testing/browser/testExplorerActions.ts @@ -84,7 +84,7 @@ export class HideTestAction extends Action2 { constructor() { super({ id: TestCommandId.HideTestAction, - title: localize('hideTest', 'Hide Test'), + title: localize2('hideTest', 'Hide Test'), menu: { id: MenuId.TestItem, group: 'builtin@2', @@ -106,7 +106,7 @@ export class UnhideTestAction extends Action2 { constructor() { super({ id: TestCommandId.UnhideTestAction, - title: localize('unhideTest', 'Unhide Test'), + title: localize2('unhideTest', 'Unhide Test'), menu: { id: MenuId.TestItem, order: ActionOrder.HideTest, @@ -130,7 +130,7 @@ export class UnhideAllTestsAction extends Action2 { constructor() { super({ id: TestCommandId.UnhideAllTestsAction, - title: localize('unhideAllTests', 'Unhide All Tests'), + title: localize2('unhideAllTests', 'Unhide All Tests'), }); } @@ -180,7 +180,7 @@ export class DebugAction extends RunVisibleAction { constructor() { super(TestRunProfileBitset.Debug, { id: TestCommandId.DebugAction, - title: localize('debug test', 'Debug Test'), + title: localize2('debug test', 'Debug Test'), icon: icons.testingDebugIcon, menu: testItemInlineAndInContext(ActionOrder.Debug, TestingContextKeys.hasDebuggableTests.isEqualTo(true)), }); @@ -191,7 +191,7 @@ export class CoverageAction extends RunVisibleAction { constructor() { super(TestRunProfileBitset.Coverage, { id: TestCommandId.RunWithCoverageAction, - title: localize('run with cover test', 'Run Test with Coverage'), + title: localize2('run with cover test', 'Run Test with Coverage'), icon: icons.testingCoverageIcon, menu: testItemInlineAndInContext(ActionOrder.Coverage, TestingContextKeys.hasCoverableTests.isEqualTo(true)), }); @@ -202,7 +202,7 @@ export class RunUsingProfileAction extends Action2 { constructor() { super({ id: TestCommandId.RunUsingProfileAction, - title: localize('testing.runUsing', 'Execute Using Profile...'), + title: localize2('testing.runUsing', 'Execute Using Profile...'), icon: icons.testingDebugIcon, menu: { id: MenuId.TestItem, @@ -238,7 +238,7 @@ export class RunAction extends RunVisibleAction { constructor() { super(TestRunProfileBitset.Run, { id: TestCommandId.RunAction, - title: localize('run test', 'Run Test'), + title: localize2('run test', 'Run Test'), icon: icons.testingRunIcon, menu: testItemInlineAndInContext(ActionOrder.Run, TestingContextKeys.hasRunnableTests.isEqualTo(true)), }); @@ -249,7 +249,7 @@ export class SelectDefaultTestProfiles extends Action2 { constructor() { super({ id: TestCommandId.SelectDefaultTestProfiles, - title: localize('testing.selectDefaultTestProfiles', 'Select Default Profile'), + title: localize2('testing.selectDefaultTestProfiles', 'Select Default Profile'), icon: icons.testingUpdateProfiles, category, }); @@ -274,7 +274,7 @@ export class ContinuousRunTestAction extends Action2 { constructor() { super({ id: TestCommandId.ToggleContinousRunForTest, - title: localize('testing.toggleContinuousRunOn', 'Turn on Continuous Run'), + title: localize2('testing.toggleContinuousRunOn', 'Turn on Continuous Run'), icon: icons.testingTurnContinuousRunOn, precondition: ContextKeyExpr.or( TestingContextKeys.isContinuousModeOn.isEqualTo(true), @@ -307,7 +307,7 @@ export class ContinuousRunUsingProfileTestAction extends Action2 { constructor() { super({ id: TestCommandId.ContinousRunUsingForTest, - title: localize('testing.startContinuousRunUsing', 'Start Continous Run Using...'), + title: localize2('testing.startContinuousRunUsing', 'Start Continous Run Using...'), icon: icons.testingDebugIcon, menu: [ { @@ -530,7 +530,7 @@ abstract class ExecuteSelectedAction extends ViewAction { export class GetSelectedProfiles extends Action2 { constructor() { - super({ id: TestCommandId.GetSelectedProfiles, title: localize('getSelectedProfiles', 'Get Selected Profiles') }); + super({ id: TestCommandId.GetSelectedProfiles, title: localize2('getSelectedProfiles', 'Get Selected Profiles') }); } /** @@ -556,7 +556,7 @@ export class GetSelectedProfiles extends Action2 { export class GetExplorerSelection extends ViewAction { constructor() { - super({ id: TestCommandId.GetExplorerSelection, title: localize('getExplorerSelection', 'Get Explorer Selection'), viewId: Testing.ExplorerViewId }); + super({ id: TestCommandId.GetExplorerSelection, title: localize2('getExplorerSelection', 'Get Explorer Selection'), viewId: Testing.ExplorerViewId }); } /** @@ -640,7 +640,7 @@ export class RunAllAction extends RunOrDebugAllTestsAction { super( { id: TestCommandId.RunAllAction, - title: localize('runAllTests', 'Run All Tests'), + title: localize2('runAllTests', 'Run All Tests'), icon: icons.testingRunAllIcon, keybinding: { weight: KeybindingWeight.WorkbenchContrib, @@ -658,7 +658,7 @@ export class DebugAllAction extends RunOrDebugAllTestsAction { super( { id: TestCommandId.DebugAllAction, - title: localize('debugAllTests', 'Debug All Tests'), + title: localize2('debugAllTests', 'Debug All Tests'), icon: icons.testingDebugIcon, keybinding: { weight: KeybindingWeight.WorkbenchContrib, @@ -676,7 +676,7 @@ export class CoverageAllAction extends RunOrDebugAllTestsAction { super( { id: TestCommandId.RunAllWithCoverageAction, - title: localize('runAllWithCoverage', 'Run All Tests with Coverage'), + title: localize2('runAllWithCoverage', 'Run All Tests with Coverage'), icon: icons.testingCoverageIcon, keybinding: { weight: KeybindingWeight.WorkbenchContrib, diff --git a/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts b/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts index 2e50852b8abff..2bd0e5f3243c9 100644 --- a/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts +++ b/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts @@ -1669,7 +1669,7 @@ export class CloseTestPeek extends EditorAction2 { constructor() { super({ id: 'editor.closeTestPeek', - title: localize('close', 'Close'), + title: localize2('close', 'Close'), icon: Codicon.close, precondition: ContextKeyExpr.or(TestingContextKeys.isInPeek, TestingContextKeys.isPeekVisible), keybinding: { @@ -2494,6 +2494,9 @@ export class GoToNextMessageAction extends Action2 { id: GoToNextMessageAction.ID, f1: true, title: localize2('testing.goToNextMessage', 'Go to Next Test Failure'), + metadata: { + description: localize2('testing.goToNextMessage.description', 'Shows the next failure message in your file') + }, icon: Codicon.arrowDown, category: Categories.Test, keybinding: { @@ -2527,6 +2530,9 @@ export class GoToPreviousMessageAction extends Action2 { id: GoToPreviousMessageAction.ID, f1: true, title: localize2('testing.goToPreviousMessage', 'Go to Previous Test Failure'), + metadata: { + description: localize2('testing.goToPreviousMessage.description', 'Shows the previous failure message in your file') + }, icon: Codicon.arrowUp, category: Categories.Test, keybinding: { @@ -2578,6 +2584,9 @@ export class ToggleTestingPeekHistory extends Action2 { id: ToggleTestingPeekHistory.ID, f1: true, title: localize2('testing.toggleTestingPeekHistory', 'Toggle Test History in Peek'), + metadata: { + description: localize2('testing.toggleTestingPeekHistory.description', 'Shows or hides the history of test runs in the peek view') + }, icon: Codicon.history, category: Categories.Test, menu: [{