Skip to content

Commit 230bce9

Browse files
authored
Merge pull request #9862 from microsoft/browntarik/changePascalCase
change to camelCase for Default, Enabled, Disabled
2 parents 3a8e920 + f611df2 commit 230bce9

File tree

8 files changed

+66
-66
lines changed

8 files changed

+66
-66
lines changed

Extension/package.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,16 +1625,16 @@
16251625
"enum": [
16261626
"clangFormat",
16271627
"vcFormat",
1628-
"Default",
1629-
"Disabled"
1628+
"default",
1629+
"disabled"
16301630
],
16311631
"markdownEnumDescriptions": [
16321632
"%c_cpp.configuration.formatting.clangFormat.markdownDescription%",
16331633
"%c_cpp.configuration.formatting.vcFormat.markdownDescription%",
16341634
"%c_cpp.configuration.formatting.Default.markdownDescription%",
16351635
"%c_cpp.configuration.formatting.Disabled.markdownDescription%"
16361636
],
1637-
"default": "Default",
1637+
"default": "default",
16381638
"description": "%c_cpp.configuration.formatting.description%",
16391639
"scope": "resource"
16401640
},
@@ -2158,11 +2158,11 @@
21582158
"C_Cpp.intelliSenseEngine": {
21592159
"type": "string",
21602160
"enum": [
2161-
"Default",
2161+
"default",
21622162
"Tag Parser",
2163-
"Disabled"
2163+
"disabled"
21642164
],
2165-
"default": "Default",
2165+
"default": "default",
21662166
"description": "%c_cpp.configuration.intelliSenseEngine.description%",
21672167
"enumDescriptions": [
21682168
"%c_cpp.configuration.intelliSenseEngine.default.description%",
@@ -2174,20 +2174,20 @@
21742174
"C_Cpp.intelliSenseEngineFallback": {
21752175
"type": "string",
21762176
"enum": [
2177-
"Enabled",
2178-
"Disabled"
2177+
"enabled",
2178+
"disabled"
21792179
],
2180-
"default": "Disabled",
2180+
"default": "disabled",
21812181
"markdownDescription": "%c_cpp.configuration.intelliSenseEngineFallback.markdownDescription%",
21822182
"scope": "resource"
21832183
},
21842184
"C_Cpp.autocomplete": {
21852185
"type": "string",
21862186
"enum": [
2187-
"Default",
2188-
"Disabled"
2187+
"default",
2188+
"disabled"
21892189
],
2190-
"default": "Default",
2190+
"default": "default",
21912191
"markdownDescription": "%c_cpp.configuration.autocomplete.markdownDescription%",
21922192
"enumDescriptions": [
21932193
"%c_cpp.configuration.autocomplete.default.description%",
@@ -2198,11 +2198,11 @@
21982198
"C_Cpp.errorSquiggles": {
21992199
"type": "string",
22002200
"enum": [
2201-
"Enabled",
2202-
"Disabled",
2203-
"EnabledIfIncludesResolve"
2201+
"enabled",
2202+
"disabled",
2203+
"enabledIfIncludesResolve"
22042204
],
2205-
"default": "EnabledIfIncludesResolve",
2205+
"default": "enabledIfIncludesResolve",
22062206
"description": "%c_cpp.configuration.errorSquiggles.description%",
22072207
"scope": "resource"
22082208
},
@@ -2393,10 +2393,10 @@
23932393
"C_Cpp.configurationWarnings": {
23942394
"type": "string",
23952395
"enum": [
2396-
"Enabled",
2397-
"Disabled"
2396+
"enabled",
2397+
"disabled"
23982398
],
2399-
"default": "Enabled",
2399+
"default": "enabled",
24002400
"description": "%c_cpp.configuration.configurationWarnings.description%",
24012401
"scope": "resource"
24022402
},
@@ -2649,10 +2649,10 @@
26492649
"C_Cpp.experimentalFeatures": {
26502650
"type": "string",
26512651
"enum": [
2652-
"Enabled",
2653-
"Disabled"
2652+
"enabled",
2653+
"disabled"
26542654
],
2655-
"default": "Disabled",
2655+
"default": "disabled",
26562656
"description": "%c_cpp.configuration.experimentalFeatures.description%",
26572657
"scope": "window"
26582658
},
@@ -2675,10 +2675,10 @@
26752675
"C_Cpp.enhancedColorization": {
26762676
"type": "string",
26772677
"enum": [
2678-
"Enabled",
2679-
"Disabled"
2678+
"enabled",
2679+
"disabled"
26802680
],
2681-
"default": "Enabled",
2681+
"default": "enabled",
26822682
"markdownDescription": "%c_cpp.configuration.enhancedColorization.markdownDescription%",
26832683
"scope": "window"
26842684
},
@@ -2709,10 +2709,10 @@
27092709
"C_Cpp.codeFolding": {
27102710
"type": "string",
27112711
"enum": [
2712-
"Enabled",
2713-
"Disabled"
2712+
"enabled",
2713+
"disabled"
27142714
],
2715-
"default": "Enabled",
2715+
"default": "enabled",
27162716
"description": "%c_cpp.configuration.codeFolding.description%",
27172717
"scope": "window"
27182718
},
@@ -5103,27 +5103,27 @@
51035103
"editor/context": [
51045104
{
51055105
"command": "C_Cpp.SwitchHeaderSource",
5106-
"when": "config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'c' || config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'cpp' || config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'cuda-cpp'",
5106+
"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'",
51075107
"group": "custom1@1"
51085108
},
51095109
{
51105110
"command": "workbench.action.gotoSymbol",
5111-
"when": "config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'c' || config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'cpp' || config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'cuda-cpp'",
5111+
"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'",
51125112
"group": "custom1@2"
51135113
},
51145114
{
51155115
"command": "workbench.action.showAllSymbols",
5116-
"when": "config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'c' || config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'cpp' || config.C_Cpp.intelliSenseEngine != 'Disabled' && editorLangId == 'cuda-cpp'",
5116+
"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'",
51175117
"group": "custom1@3"
51185118
},
51195119
{
51205120
"command": "C_Cpp.RunCodeAnalysisOnActiveFile",
5121-
"when": "config.C_Cpp.intelliSenseEngine == 'Default' && editorLangId == 'c' || config.C_Cpp.intelliSenseEngine == 'Default' && editorLangId == 'cpp' || config.C_Cpp.intelliSenseEngine == 'Default' && editorLangId == 'cuda-cpp'",
5121+
"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'",
51225122
"group": "custom2@1"
51235123
},
51245124
{
51255125
"command": "C_Cpp.RestartIntelliSenseForFile",
5126-
"when": "config.C_Cpp.intelliSenseEngine == 'Default' && editorLangId == 'c' || config.C_Cpp.intelliSenseEngine == 'Default' && editorLangId == 'cpp' || config.C_Cpp.intelliSenseEngine == 'Default' && editorLangId == 'cuda-cpp'",
5126+
"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'",
51275127
"group": "custom2@2"
51285128
},
51295129
{

Extension/package.nls.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "Provides \"fuzzy\" results that are not context-aware.",
168168
"c_cpp.configuration.intelliSenseEngine.disabled.description": "Turns off C/C++ language service features.",
169169
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": { "message": "Controls whether the IntelliSense engine will automatically switch to the Tag Parser for translation units containing `#include` errors.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] },
170-
"c_cpp.configuration.autocomplete.markdownDescription": { "message": "Controls the auto-completion provider. If `Disabled` and you want word-based completion, you will also need to set `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (and similarly for `c` and `cuda-cpp` languages).", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] },
170+
"c_cpp.configuration.autocomplete.markdownDescription": { "message": "Controls the auto-completion provider. If `disabled` and you want word-based completion, you will also need to set `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (and similarly for `c` and `cuda-cpp` languages).", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] },
171171
"c_cpp.configuration.autocomplete.default.description": "Uses the active IntelliSense engine.",
172172
"c_cpp.configuration.autocomplete.disabled.description": "Uses the word-based completion provided by Visual Studio Code.",
173173
"c_cpp.configuration.errorSquiggles.description": "Controls whether suspected compile errors detected by the IntelliSense engine will be reported back to the editor. It also controls whether code analysis warnings are reported if includes can't be found. This setting is ignored by the Tag Parser engine.",
@@ -227,7 +227,7 @@
227227
"c_cpp.configuration.experimentalFeatures.description": "Controls whether \"experimental\" features are usable.",
228228
"c_cpp.configuration.suggestSnippets.markdownDescription": { "message": "If `true`, snippets are provided by the language server.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] },
229229
"c_cpp.configuration.caseSensitiveFileSupport.markdownDescription": { "message": "If set to `default`, the file system of the workspace is assumed to be case insensitive on Windows and case sensitive on macOS or Linux. If set to `enabled`, the file system of the workspace is assumed to be case sensitive on Windows.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] },
230-
"c_cpp.configuration.enhancedColorization.markdownDescription": { "message": "If enabled, code is colorized based on IntelliSense. This setting only applies if `#C_Cpp.intelliSenseEngine#` is set to `Default`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] },
230+
"c_cpp.configuration.enhancedColorization.markdownDescription": { "message": "If enabled, code is colorized based on IntelliSense. This setting only applies if `#C_Cpp.intelliSenseEngine#` is set to `default`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] },
231231
"c_cpp.configuration.codeFolding.description": "If enabled, code folding ranges are provided by the language server.",
232232
"c_cpp.configuration.vcpkg.enabled.markdownDescription": { "message": "Enable integration services for the [vcpkg dependency manager](https://aka.ms/vcpkg/).", "comment": [ "Markdown text between () should not be altered: https://en.wikipedia.org/wiki/Markdown" ] },
233233
"c_cpp.configuration.addNodeAddonIncludePaths.markdownDescription": { "message": "Add include paths from `nan` and `node-addon-api` when they are dependencies.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] },

Extension/src/Debugger/configurationProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export class DebugConfigurationProvider implements vscode.DebugConfigurationProv
166166

167167
if (config.preLaunchTask) {
168168
config.configSource = this.getDebugConfigSource(config, folder);
169-
const isIntelliSenseDisabled: boolean = new CppSettings((vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0) ? vscode.workspace.workspaceFolders[0]?.uri : undefined).intelliSenseEngine === "Disabled";
169+
const isIntelliSenseDisabled: boolean = new CppSettings((vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0) ? vscode.workspace.workspaceFolders[0]?.uri : undefined).intelliSenseEngine === "disabled";
170170
// Run the build task if IntelliSense is disabled.
171171
if (isIntelliSenseDisabled) {
172172
try {

Extension/src/LanguageServer/client.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ export class DefaultClient implements Client {
897897
this.disposables.push(vscode.languages.registerDocumentSymbolProvider(this.documentSelector, new DocumentSymbolProvider(this), undefined));
898898
this.disposables.push(vscode.languages.registerCodeActionsProvider(this.documentSelector, new CodeActionProvider(this), undefined));
899899
const settings: CppSettings = new CppSettings();
900-
if (settings.formattingEngine !== "Disabled") {
900+
if (settings.formattingEngine !== "disabled") {
901901
this.documentFormattingProviderDisposable = vscode.languages.registerDocumentFormattingEditProvider(this.documentSelector, new DocumentFormattingEditProvider(this));
902902
this.formattingRangeProviderDisposable = vscode.languages.registerDocumentRangeFormattingEditProvider(this.documentSelector, new DocumentRangeFormattingEditProvider(this));
903903
this.onTypeFormattingProviderDisposable = vscode.languages.registerOnTypeFormattingEditProvider(this.documentSelector, new OnTypeFormattingEditProvider(this), ";", "}", "\n");
@@ -1162,10 +1162,10 @@ export class DefaultClient implements Client {
11621162
settings_clangFormatFallbackStyle.push(setting.clangFormatFallbackStyle);
11631163
settings_clangFormatSortIncludes.push(setting.clangFormatSortIncludes);
11641164
settings_intelliSenseEngine.push(setting.intelliSenseEngine);
1165-
settings_intelliSenseEngineFallback.push(setting.intelliSenseEngineFallback);
1165+
settings_intelliSenseEngineFallback.push(setting.intelliSenseEngineFallback ? "enabled" : "disabled");
11661166
settings_errorSquiggles.push(setting.errorSquiggles);
11671167
settings_dimInactiveRegions.push(setting.dimInactiveRegions);
1168-
settings_enhancedColorization.push(workspaceSettings.enhancedColorization ? "Enabled" : "Disabled");
1168+
settings_enhancedColorization.push(workspaceSettings.enhancedColorization ? "enabled" : "disabled");
11691169
settings_suggestSnippets.push(setting.suggestSnippets);
11701170
settings_exclusionPolicy.push(setting.exclusionPolicy);
11711171
settings_preferredPathSeparator.push(setting.preferredPathSeparator);
@@ -1375,7 +1375,7 @@ export class DefaultClient implements Client {
13751375
systemIncludePath: settings_defaultSystemIncludePath
13761376
},
13771377
vcpkg_root: util.getVcpkgRoot(),
1378-
experimentalFeatures: workspaceSettings.experimentalFeatures,
1378+
experimentalFeatures: workspaceSettings.experimentalFeatures ? "enabled" : "disabled",
13791379
edgeMessagesDirectory: path.join(util.getExtensionFilePath("bin"), "messages", getLocaleId()),
13801380
localizedStrings: localizedStrings,
13811381
packageVersion: util.packageJson.version,
@@ -1526,7 +1526,7 @@ export class DefaultClient implements Client {
15261526
const settings: CppSettings = new CppSettings();
15271527
if (changedSettings["formatting"]) {
15281528
const folderSettings: CppSettings = new CppSettings(this.RootUri);
1529-
if (folderSettings.formattingEngine !== "Disabled") {
1529+
if (folderSettings.formattingEngine !== "disabled") {
15301530
// Because the setting is not a bool, changes do not always imply we need to
15311531
// register/unregister the providers.
15321532
if (!this.documentFormattingProviderDisposable) {
@@ -1962,7 +1962,7 @@ export class DefaultClient implements Client {
19621962
return;
19631963
}
19641964
const settings: CppSettings = new CppSettings(this.RootUri);
1965-
if (settings.configurationWarnings === "Enabled" && !this.isExternalHeader(docUri) && !vscode.debug.activeDebugSession) {
1965+
if (settings.configurationWarnings === true && !this.isExternalHeader(docUri) && !vscode.debug.activeDebugSession) {
19661966
const dismiss: string = localize("dismiss.button", "Dismiss");
19671967
const disable: string = localize("diable.warnings.button", "Disable Warnings");
19681968
const configName: string | undefined = this.configuration.CurrentConfiguration?.name;
@@ -1979,7 +1979,7 @@ export class DefaultClient implements Client {
19791979
vscode.window.showInformationMessage(message, dismiss, disable).then(response => {
19801980
switch (response) {
19811981
case disable: {
1982-
settings.toggleSetting("configurationWarnings", "Enabled", "Disabled");
1982+
settings.toggleSetting("configurationWarnings", "enabled", "disabled");
19831983
break;
19841984
}
19851985
}

Extension/src/LanguageServer/customProviders.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export class CustomConfigurationProviderCollection {
158158
}
159159

160160
public add(provider: CustomConfigurationProvider, version: Version): boolean {
161-
if (new CppSettings(ext.getActiveClient().RootUri).intelliSenseEngine === "Disabled") {
161+
if (new CppSettings(ext.getActiveClient().RootUri).intelliSenseEngine === "disabled") {
162162
console.warn("Language service is disabled. Provider will not be registered.");
163163
return false;
164164
}

0 commit comments

Comments
 (0)