diff --git a/Extension/package.json b/Extension/package.json index 49701bccf..e07af7649 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -1703,6 +1703,12 @@ "description": "%c_cpp.configuration.doxygen.generateOnType.description%", "scope": "resource" }, + "C_Cpp.doxygen.generateOnCodeAction": { + "type": "boolean", + "default": true, + "description": "%c_cpp.configuration.doxygen.generateOnCodeAction.description%", + "scope": "resource" + }, "C_Cpp.doxygen.generatedStyle": { "type": "string", "enum": [ diff --git a/Extension/package.nls.json b/Extension/package.nls.json index ca0f42449..9adf8c517 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -580,6 +580,7 @@ ] }, "c_cpp.configuration.doxygen.generateOnType.description": "Controls whether to automatically insert the Doxygen comment after typing the chosen comment style.", + "c_cpp.configuration.doxygen.generateOnCodeAction.description": "Controls whether the code action to generate a Doxygen comment is enabled.", "c_cpp.configuration.doxygen.generatedStyle.description": "The string of characters used as the starting line of the Doxygen comment.", "c_cpp.configuration.doxygen.sectionTags.description": "Select the Doxygen section tags that you would like to appear on hover in the tooltip area when the 'Simplify Structured Comments' setting is enabled. ", "c_cpp.configuration.commentContinuationPatterns.items.anyof.string.markdownDescription": { diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 9fd268013..680c14749 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -1537,6 +1537,7 @@ export class DefaultClient implements Client { vcFormatSpaceAroundTernaryOperator: settings.vcFormatSpaceAroundTernaryOperator, vcFormatWrapPreserveBlocks: settings.vcFormatWrapPreserveBlocks, doxygenGenerateOnType: settings.doxygenGenerateOnType, + doxygenGenerateOnCodeAction: settings.doxygenGenerateOnCodeAction, doxygenGeneratedStyle: settings.doxygenGeneratedCommentStyle, doxygenSectionTags: settings.doxygenSectionTags, filesExclude: otherSettings.filesExclude, diff --git a/Extension/src/LanguageServer/settings.ts b/Extension/src/LanguageServer/settings.ts index 881423789..a80d54347 100644 --- a/Extension/src/LanguageServer/settings.ts +++ b/Extension/src/LanguageServer/settings.ts @@ -126,6 +126,7 @@ export interface WorkspaceFolderSettingsParams { vcFormatSpaceAroundTernaryOperator: string; vcFormatWrapPreserveBlocks: string; doxygenGenerateOnType: boolean; + doxygenGenerateOnCodeAction: boolean; doxygenGeneratedStyle: string; doxygenSectionTags: string[]; filesExclude: Excludes; @@ -383,6 +384,7 @@ export class CppSettings extends Settings { public get simplifyStructuredComments(): boolean { return this.getAsBoolean("simplifyStructuredComments"); } public get doxygenGeneratedCommentStyle(): string { return this.getAsString("doxygen.generatedStyle"); } public get doxygenGenerateOnType(): boolean { return this.getAsBoolean("doxygen.generateOnType"); } + public get doxygenGenerateOnCodeAction(): boolean { return this.getAsBoolean("doxygen.generateOnCodeAction"); } public get commentContinuationPatterns(): (string | CommentPattern)[] { const value: any = super.Section.get("commentContinuationPatterns"); if (this.isArrayOfCommentContinuationPatterns(value)) {