Skip to content

Commit 6b20994

Browse files
authored
Clean up the command palette. (#11259)
* Clean up the command palette.
1 parent c76105e commit 6b20994

File tree

1 file changed

+120
-12
lines changed

1 file changed

+120
-12
lines changed

Extension/package.json

Lines changed: 120 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3221,7 +3221,7 @@
32213221
{
32223222
"command": "C_Cpp.SwitchHeaderSource",
32233223
"key": "Alt+O",
3224-
"when": "editorLangId == 'c' && editorTextFocus || editorLangId == 'cpp' && editorTextFocus || editorLangId == 'cuda-cpp' && editorTextFocus"
3224+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && editorTextFocus && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
32253225
}
32263226
],
32273227
"debuggers": [
@@ -5458,65 +5458,173 @@
54585458
"editor/title/run": [
54595459
{
54605460
"command": "C_Cpp.BuildAndDebugFile",
5461-
"when": "editorLangId == 'c' && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile || editorLangId == 'cpp' && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile || editorLangId == 'cuda-cpp' && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile",
5461+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile",
54625462
"group": "navigation@0"
54635463
},
54645464
{
54655465
"command": "C_Cpp.BuildAndRunFile",
5466-
"when": "editorLangId == 'c' && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile || editorLangId == 'cpp' && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile || editorLangId == 'cuda-cpp' && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile",
5466+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile",
54675467
"group": "navigation@1"
54685468
}
54695469
],
54705470
"editor/title": [
54715471
{
54725472
"command": "C_Cpp.AddDebugConfiguration",
5473-
"when": "editorLangId == 'c' && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile && cpptools.buildAndDebug.isFolderOpen || editorLangId == 'cpp' && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile && cpptools.buildAndDebug.isFolderOpen || editorLangId == 'cuda-cpp' && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile && cpptools.buildAndDebug.isFolderOpen",
5473+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile && cpptools.buildAndDebug.isFolderOpen",
54745474
"group": "navigation"
54755475
}
54765476
],
54775477
"editor/context": [
54785478
{
54795479
"command": "C_Cpp.SwitchHeaderSource",
5480-
"when": "config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'c' || config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'cpp' || config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'cuda-cpp'",
5480+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)",
54815481
"group": "custom1@1"
54825482
},
54835483
{
54845484
"command": "workbench.action.gotoSymbol",
5485-
"when": "config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'c' || config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'cpp' || config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'cuda-cpp'",
5485+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)",
54865486
"group": "custom1@2"
54875487
},
54885488
{
54895489
"command": "workbench.action.showAllSymbols",
5490-
"when": "config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'c' || config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'cpp' || config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'cuda-cpp'",
5490+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)",
54915491
"group": "custom1@3"
54925492
},
54935493
{
54945494
"command": "C_Cpp.RunCodeAnalysisOnActiveFile",
5495-
"when": "config.C_Cpp.intelliSenseEngine == 'Default' && editorLangId == 'c' || config.C_Cpp.intelliSenseEngine == 'default' && editorLangId == 'c' || config.C_Cpp.intelliSenseEngine == 'Default' && editorLangId == 'cpp' || config.C_Cpp.intelliSenseEngine == 'default' && editorLangId == 'cpp' || config.C_Cpp.intelliSenseEngine == 'Default' && editorLangId == 'cuda-cpp' || config.C_Cpp.intelliSenseEngine == 'default' && editorLangId == 'cuda-cpp'",
5495+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/",
54965496
"group": "custom2@1"
54975497
},
54985498
{
54995499
"command": "C_Cpp.RestartIntelliSenseForFile",
5500-
"when": "config.C_Cpp.intelliSenseEngine == 'Default' && editorLangId == 'c' || config.C_Cpp.intelliSenseEngine == 'default' && editorLangId == 'c' || config.C_Cpp.intelliSenseEngine == 'Default' && editorLangId == 'cpp' || config.C_Cpp.intelliSenseEngine == 'default' && editorLangId == 'cpp' || config.C_Cpp.intelliSenseEngine == 'Default' && editorLangId == 'cuda-cpp' || config.C_Cpp.intelliSenseEngine == 'default' && editorLangId == 'cuda-cpp'",
5500+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/",
55015501
"group": "custom2@2"
55025502
},
55035503
{
55045504
"command": "C_Cpp.AddDebugConfiguration",
5505-
"when": "editorLangId == 'c' && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile && cpptools.buildAndDebug.isFolderOpen || editorLangId == 'cpp' && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile && cpptools.buildAndDebug.isFolderOpen || editorLangId == 'cuda-cpp' && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile && cpptools.buildAndDebug.isFolderOpen",
5505+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile && cpptools.buildAndDebug.isFolderOpen",
55065506
"group": "custom2@3"
55075507
},
55085508
{
55095509
"command": "C_Cpp.GenerateDoxygenComment",
5510-
"when": "editorLangId == 'c' && config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled' || editorLangId == 'cpp' && config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled' || editorLangId == 'cuda-cpp' && config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled'",
5510+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)",
55115511
"group": "custom2@4"
55125512
},
55135513
{
55145514
"command": "C_Cpp.CreateDeclarationOrDefinition",
5515-
"when": "editorLangId == 'c' && config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled' || editorLangId == 'cpp' && config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled' || editorLangId == 'cuda-cpp' && config.C_Cpp.intelliSenseEngine != 'disabled' && config.C_Cpp.intelliSenseEngine != 'Disabled'",
5515+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)",
55165516
"group": "custom2@5"
55175517
}
55185518
],
55195519
"commandPalette": [
5520+
{
5521+
"command": "C_Cpp.ConfigurationSelect",
5522+
"when": "!(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5523+
},
5524+
{
5525+
"command": "C_Cpp.ConfigurationProviderSelect",
5526+
"when": "!(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5527+
},
5528+
{
5529+
"command": "C_Cpp.ConfigurationEditJSON",
5530+
"when": "!(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5531+
},
5532+
{
5533+
"command": "C_Cpp.ConfigurationEditUI",
5534+
"when": "!(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5535+
},
5536+
{
5537+
"command": "C_Cpp.SelectIntelliSenseConfiguration",
5538+
"when": "!(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5539+
},
5540+
{
5541+
"command": "C_Cpp.SwitchHeaderSource",
5542+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5543+
},
5544+
{
5545+
"command": "C_Cpp.EnableErrorSquiggles",
5546+
"when": "config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/"
5547+
},
5548+
{
5549+
"command": "C_Cpp.DisableErrorSquiggles",
5550+
"when": "config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/"
5551+
},
5552+
{
5553+
"command": "C_Cpp.ToggleIncludeFallback",
5554+
"when": "config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/"
5555+
},
5556+
{
5557+
"command": "C_Cpp.ToggleDimInactiveRegions",
5558+
"when": "config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/"
5559+
},
5560+
{
5561+
"command": "C_Cpp.ResetDatabase",
5562+
"when": "!(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5563+
},
5564+
{
5565+
"command": "C_Cpp.RestartIntelliSenseForFile",
5566+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/"
5567+
},
5568+
{
5569+
"command": "C_Cpp.LogDiagnostics",
5570+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5571+
},
5572+
{
5573+
"command": "C_Cpp.RescanWorkspace",
5574+
"when": "!(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5575+
},
5576+
{
5577+
"command": "C_Cpp.VcpkgClipboardInstallSuggested",
5578+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/"
5579+
},
5580+
{
5581+
"command": "C_Cpp.GenerateEditorConfig",
5582+
"when": "!(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5583+
},
5584+
{
5585+
"command": "C_Cpp.GoToNextDirectiveInGroup",
5586+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5587+
},
5588+
{
5589+
"command": "C_Cpp.GoToPrevDirectiveInGroup",
5590+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5591+
},
5592+
{
5593+
"command": "C_Cpp.CreateDeclarationOrDefinition",
5594+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5595+
},
5596+
{
5597+
"command": "C_Cpp.RunCodeAnalysisOnActiveFile",
5598+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/"
5599+
},
5600+
{
5601+
"command": "C_Cpp.RunCodeAnalysisOnOpenFiles",
5602+
"when": "config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/"
5603+
},
5604+
{
5605+
"command": "C_Cpp.RunCodeAnalysisOnAllFiles",
5606+
"when": "config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/"
5607+
},
5608+
{
5609+
"command": "C_Cpp.RemoveAllCodeAnalysisProblems",
5610+
"when": "config.C_Cpp.intelliSenseEngine =~ /^[dD]efault$/"
5611+
},
5612+
{
5613+
"command": "C_Cpp.BuildAndDebugFile",
5614+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile"
5615+
},
5616+
{
5617+
"command": "C_Cpp.BuildAndRunFile",
5618+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isSourceFile"
5619+
},
5620+
{
5621+
"command": "C_Cpp.AddDebugConfiguration",
5622+
"when": "config.C_Cpp.debugShortcut && cpptools.buildAndDebug.isFolderOpen"
5623+
},
5624+
{
5625+
"command": "C_Cpp.GenerateDoxygenComment",
5626+
"when": "editorLangId =~ /^(c|(cuda-)?cpp)$/ && !(config.C_Cpp.intelliSenseEngine =~ /^[dD]isabled$/)"
5627+
},
55205628
{
55215629
"command": "C_Cpp.referencesViewGroupByType",
55225630
"when": "cpptools.hasReferencesResults"

0 commit comments

Comments
 (0)