summaryrefslogtreecommitdiffstats
path: root/src/DocGen
diff options
context:
space:
mode:
authorRowan Goemans <RB.Goemans@student.han.nl>2017-10-15 03:37:26 +0200
committerRowan Goemans <RB.Goemans@student.han.nl>2017-10-15 03:37:26 +0200
commitbb8524924007367b331a1bac27808f2d9796dc55 (patch)
tree9b24ffef4c0135a13312d2f5b1b9e27454377e97 /src/DocGen
parentd46ea00283644ff3f222854c02f9d95a49b91e2e (diff)
downloaddoxdocgen-bb8524924007367b331a1bac27808f2d9796dc55.tar.gz
-- Added defaults to configuration reader in CGen.
Diffstat (limited to 'src/DocGen')
-rw-r--r--src/DocGen/CGen.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/DocGen/CGen.ts b/src/DocGen/CGen.ts
index 0b02d09..0f8ce52 100644
--- a/src/DocGen/CGen.ts
+++ b/src/DocGen/CGen.ts
@@ -67,17 +67,17 @@ export default class CGen implements IDocGen {
protected readConfig() {
const getCfg = workspace.getConfiguration;
- this.firstLine = getCfg(ConfigType.generic).get<string>(Config.firstLine, "");
- this.commentPrefix = getCfg(ConfigType.generic).get<string>(Config.commentPrefix, "");
- this.lastLine = getCfg(ConfigType.generic).get<string>(Config.lastLine, "");
+ this.firstLine = getCfg(ConfigType.generic).get<string>(Config.firstLine, "/**");
+ this.commentPrefix = getCfg(ConfigType.generic).get<string>(Config.commentPrefix, " * ");
+ this.lastLine = getCfg(ConfigType.generic).get<string>(Config.lastLine, "**/");
this.newLineAfterBrief = getCfg(ConfigType.generic).get<boolean>(Config.newLineAfterBrief, true);
this.newLineAfterParams = getCfg(ConfigType.generic).get<boolean>(Config.newLineAfterParams, false);
this.newLineAfterTParams = getCfg(ConfigType.generic).get<boolean>(Config.newLineAfterTParams, false);
this.includeTypeAtReturn = getCfg(ConfigType.generic).get<boolean>(Config.includeTypeAtReturn, false);
- this.briefTemplate = getCfg(ConfigType.generic).get<string>(Config.briefTemplate, "");
- this.paramTemplate = getCfg(ConfigType.generic).get<string>(Config.paramTemplate, "");
- this.tparamTemplate = getCfg(ConfigType.generic).get<string>(Config.tparamTemplate, "");
- this.returnTemplate = getCfg(ConfigType.generic).get<string>(Config.returnTemplate, "");
+ this.briefTemplate = getCfg(ConfigType.generic).get<string>(Config.briefTemplate, "@brief ");
+ this.paramTemplate = getCfg(ConfigType.generic).get<string>(Config.paramTemplate, "@param {param} ");
+ this.tparamTemplate = getCfg(ConfigType.generic).get<string>(Config.tparamTemplate, "@tparam {param} ");
+ this.returnTemplate = getCfg(ConfigType.generic).get<string>(Config.returnTemplate, "@return {param} ");
}
protected getIndentation(): string {
@@ -169,7 +169,7 @@ export default class CGen implements IDocGen {
character = comment.indexOf("\n", oldCharacter + 1) - oldCharacter;
}
- // If newline is not found means no first param was found so Set to base position.
+ // If newline is not found means no first param was found so Set to base line before the newline.
if (character < 0) {
line = baseLine;
character = baseCharacter;