From 16452c8e0c644fa979270e99906eb9c34a13ca5f Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Fri, 2 Mar 2018 22:21:22 +0100 Subject: Make order of comment tags customizable Fix #55 --- src/Config.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/Config.ts') diff --git a/src/Config.ts b/src/Config.ts index aed2105..0fcd5a2 100644 --- a/src/Config.ts +++ b/src/Config.ts @@ -21,7 +21,6 @@ class Cpp { return workspace.getConfiguration("doxdocgen.cpp"); } - public newLineAfterTParams: boolean = false; public tparamTemplate: string = "@tparam {param} "; public ctorText: string = "Construct a new {name} object"; public dtorText: string = "Destroy the {name} object"; @@ -33,7 +32,7 @@ class File { } public fileTemplate: string = "@file {name}"; - public fileOrder: string[] = ["brief", "file", "author", "date"]; + public fileOrder: string[] = ["brief", "empty", "file", "author", "date"]; } class Generic { @@ -41,8 +40,6 @@ class Generic { return workspace.getConfiguration("doxdocgen.generic"); } - public newLineAfterBrief: boolean = true; - public newLineAfterParams: boolean = false; public includeTypeAtReturn: boolean = true; public boolReturnsTrueFalse: boolean = true; public briefTemplate: string = "@brief "; @@ -54,6 +51,7 @@ class Generic { public dateFormat: string = "YYYY-MM-DD"; public generateSmartText: boolean = true; public splitCasingSmartText: boolean = true; + public order: string[] = ["brief", "empty", "tparam", "param", "return"]; } export class Config { @@ -68,7 +66,6 @@ export class Config { values.C.setterText = C.getConfiguration().get("setterText", values.C.setterText); values.C.factoryMethodText = C.getConfiguration().get("factoryMethodText", values.C.factoryMethodText); - values.Cpp.newLineAfterTParams = Cpp.getConfiguration().get("newLineAfterTParams", values.Cpp.newLineAfterTParams); values.Cpp.tparamTemplate = Cpp.getConfiguration().get("tparamTemplate", values.Cpp.tparamTemplate); values.Cpp.ctorText = Cpp.getConfiguration().get("ctorText", values.Cpp.ctorText); values.Cpp.dtorText = Cpp.getConfiguration().get("dtorText", values.Cpp.dtorText); @@ -76,8 +73,6 @@ export class Config { values.File.fileTemplate = File.getConfiguration().get("fileTemplate", values.File.fileTemplate); values.File.fileOrder = File.getConfiguration().get("fileOrder", values.File.fileOrder); - values.Generic.newLineAfterBrief = Generic.getConfiguration().get("newLineAfterBrief", values.Generic.newLineAfterBrief); - values.Generic.newLineAfterParams = Generic.getConfiguration().get("newLineAfterParams", values.Generic.newLineAfterParams); values.Generic.includeTypeAtReturn = Generic.getConfiguration().get("includeTypeAtReturn", values.Generic.includeTypeAtReturn); values.Generic.boolReturnsTrueFalse = Generic.getConfiguration().get("boolReturnsTrueFalse", values.Generic.boolReturnsTrueFalse); values.Generic.briefTemplate = Generic.getConfiguration().get("briefTemplate", values.Generic.briefTemplate); @@ -89,6 +84,7 @@ export class Config { values.Generic.dateFormat = Generic.getConfiguration().get("dateFormat", values.Generic.dateFormat); values.Generic.generateSmartText = Generic.getConfiguration().get("generateSmartText", values.Generic.generateSmartText); values.Generic.splitCasingSmartText = Generic.getConfiguration().get("splitCasingSmartText", values.Generic.splitCasingSmartText); + values.Generic.order = Generic.getConfiguration().get("order", values.Generic.order); return values; } -- cgit v1.2.3