summaryrefslogtreecommitdiffstats
path: root/src/CodeParser
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2017-10-09 21:15:00 +0200
committerChristoph Schlosser <christophschlosser@users.noreply.github.com>2017-10-09 21:48:19 +0200
commitf1f1b62073a36df8e2e2f08fd343ebdaab77ed82 (patch)
tree53fddac46fefa91e46b50b4863fbaff7d82a8251 /src/CodeParser
parent922d75bcc24f16f817d8ab3f11d43a4edffb1f9f (diff)
downloaddoxdocgen-f1f1b62073a36df8e2e2f08fd343ebdaab77ed82.tar.gz
Add option to choose Qt style comment start0.0.3
Diffstat (limited to 'src/CodeParser')
-rw-r--r--src/CodeParser/CodeParserController.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/CodeParser/CodeParserController.ts b/src/CodeParser/CodeParserController.ts
index 7ed113e..49d4082 100644
--- a/src/CodeParser/CodeParserController.ts
+++ b/src/CodeParser/CodeParserController.ts
@@ -1,4 +1,5 @@
import { Disposable, Position, TextDocumentContentChangeEvent, TextEditor, TextLine, window, workspace } from "vscode";
+import { Config, ConfigType } from "../Config";
import CodeParser from "./CodeParser";
import CParser from "./CParser";
import CppParser from "./CppParser";
@@ -22,12 +23,12 @@ export default class CodeParserController {
public constructor() {
const subscriptions: Disposable[] = [];
- this.readConfig();
-
// Hand off the event to the parser if a valid parser is found
workspace.onDidChangeTextDocument((event) => {
const activeEditor: TextEditor = window.activeTextEditor;
if (activeEditor && event.document === activeEditor.document) {
+ this.readConfig();
+
this.onEvent(activeEditor, event.contentChanges[0]);
}
}, this, subscriptions);
@@ -50,7 +51,8 @@ export default class CodeParserController {
***************************************************************************/
private readConfig() {
- this.indicators.push("/**"); // TODO: make this customizable
+ this.indicators.pop();
+ this.indicators.push(workspace.getConfiguration(ConfigType.generic).get<string>(Config.commentStart, "/**"));
}
private check(activeEditor: TextEditor, event: TextDocumentContentChangeEvent): boolean {