diff options
| author | Rowan Goemans <RB.Goemans@student.han.nl> | 2017-10-15 13:29:28 +0200 |
|---|---|---|
| committer | Rowan Goemans <RB.Goemans@student.han.nl> | 2017-10-15 13:29:28 +0200 |
| commit | 32baa67d95609fc2b0f20c582fe152eeee98ff35 (patch) | |
| tree | f5435eda43b5d9bd22348f4400028c07b4a446c8 | |
| parent | d78b9876918ce8d65876968ee120b2144178af32 (diff) | |
| download | doxdocgen-32baa67d95609fc2b0f20c582fe152eeee98ff35.tar.gz | |
-- Fixed issues from review.
| -rw-r--r-- | package.json | 4 | ||||
| -rw-r--r-- | src/Config.ts | 2 | ||||
| -rw-r--r-- | src/DocGen/CGen.ts | 14 |
3 files changed, 10 insertions, 10 deletions
diff --git a/package.json b/package.json index 01e9ad7..c288cd6 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,8 @@ "type": "string", "default": "/**" }, - "doxdocgen.generic.prefix": { - "description": "The pre fix that is used for each comment line.", + "doxdocgen.generic.commentPrefix": { + "description": "The prefix that is used for each comment line.", "type": "string", "default": " * " }, diff --git a/src/Config.ts b/src/Config.ts index 0b9e593..3cc78fb 100644 --- a/src/Config.ts +++ b/src/Config.ts @@ -5,7 +5,7 @@ export enum ConfigType { export enum Config { triggerSequence = "triggerSequence", firstLine = "firstLine", - prefix = "prefix", + commentPrefix = "commentPrefix", lastLine = "lastLine", newLineAfterBrief = "newLineAfterBrief", newLineAfterParams = "newLineAfterParams", diff --git a/src/DocGen/CGen.ts b/src/DocGen/CGen.ts index 26d5754..c2750ee 100644 --- a/src/DocGen/CGen.ts +++ b/src/DocGen/CGen.ts @@ -4,7 +4,7 @@ import { IDocGen } from "./DocGen"; export default class CGen implements IDocGen { protected firstLine: string; - protected prefix: string; + protected commentPrefix: string; protected lastLine: string; protected newLineAfterBrief: boolean; protected newLineAfterParams: boolean; @@ -69,7 +69,7 @@ export default class CGen implements IDocGen { const getCfg = workspace.getConfiguration; this.firstLine = getCfg(ConfigType.generic).get<string>(Config.firstLine, "/**"); - this.prefix = getCfg(ConfigType.generic).get<string>(Config.prefix, " * "); + 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); @@ -101,14 +101,14 @@ export default class CGen implements IDocGen { } protected generateBrief(lines: string[]) { - lines.push(this.prefix + this.briefTemplate); + lines.push(this.commentPrefix + this.briefTemplate); } protected generateFromTemplate(lines: string[], replace: string, template: string, templateWith: string[]) { let line: string = ""; templateWith.forEach((element: string) => { - line = this.prefix; + line = this.commentPrefix; line += this.getTemplatedString(replace, template, element); lines.push(line); }); @@ -124,21 +124,21 @@ export default class CGen implements IDocGen { if (this.briefTemplate.trim().length !== 0) { this.generateBrief(lines); if (this.newLineAfterBrief === true) { - lines.push(this.prefix); + lines.push(this.commentPrefix); } } if (this.tparamTemplate.trim().length !== 0 && this.tparams.length > 0) { this.generateFromTemplate(lines, this.templateParamReplace, this.tparamTemplate, this.tparams); if (this.newLineAfterTParams === true) { - lines.push(this.prefix); + lines.push(this.commentPrefix); } } if (this.paramTemplate.trim().length !== 0 && this.params.length > 0) { this.generateFromTemplate(lines, this.templateParamReplace, this.paramTemplate, this.params); if (this.newLineAfterParams === true) { - lines.push(this.prefix); + lines.push(this.commentPrefix); } } |