|
3221 | 3221 | {
|
3222 | 3222 | "command": "C_Cpp.SwitchHeaderSource",
|
3223 | 3223 | "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$/)" |
3225 | 3225 | }
|
3226 | 3226 | ],
|
3227 | 3227 | "debuggers": [
|
|
5458 | 5458 | "editor/title/run": [
|
5459 | 5459 | {
|
5460 | 5460 | "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", |
5462 | 5462 | "group": "navigation@0"
|
5463 | 5463 | },
|
5464 | 5464 | {
|
5465 | 5465 | "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", |
5467 | 5467 | "group": "navigation@1"
|
5468 | 5468 | }
|
5469 | 5469 | ],
|
5470 | 5470 | "editor/title": [
|
5471 | 5471 | {
|
5472 | 5472 | "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", |
5474 | 5474 | "group": "navigation"
|
5475 | 5475 | }
|
5476 | 5476 | ],
|
5477 | 5477 | "editor/context": [
|
5478 | 5478 | {
|
5479 | 5479 | "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$/)", |
5481 | 5481 | "group": "custom1@1"
|
5482 | 5482 | },
|
5483 | 5483 | {
|
5484 | 5484 | "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$/)", |
5486 | 5486 | "group": "custom1@2"
|
5487 | 5487 | },
|
5488 | 5488 | {
|
5489 | 5489 | "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$/)", |
5491 | 5491 | "group": "custom1@3"
|
5492 | 5492 | },
|
5493 | 5493 | {
|
5494 | 5494 | "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$/", |
5496 | 5496 | "group": "custom2@1"
|
5497 | 5497 | },
|
5498 | 5498 | {
|
5499 | 5499 | "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$/", |
5501 | 5501 | "group": "custom2@2"
|
5502 | 5502 | },
|
5503 | 5503 | {
|
5504 | 5504 | "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", |
5506 | 5506 | "group": "custom2@3"
|
5507 | 5507 | },
|
5508 | 5508 | {
|
5509 | 5509 | "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$/)", |
5511 | 5511 | "group": "custom2@4"
|
5512 | 5512 | },
|
5513 | 5513 | {
|
5514 | 5514 | "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$/)", |
5516 | 5516 | "group": "custom2@5"
|
5517 | 5517 | }
|
5518 | 5518 | ],
|
5519 | 5519 | "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 | + }, |
5520 | 5628 | {
|
5521 | 5629 | "command": "C_Cpp.referencesViewGroupByType",
|
5522 | 5630 | "when": "cpptools.hasReferencesResults"
|
|
0 commit comments