diff --git a/README.md b/README.md index 9e22d8c8dc54de2cc0c9a49b8850376fdeb31fce..b78b4381cfa8c6219a89e68ca904911fb1e4dd3c 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,9 @@ Compiler support for b/eventb via ProB. You need a nightly build of ProB to full This extension contributes the following settings: * `languageServer.probHome`: to set the path to ProB -* `languageServer.wdChecks`: to enable/disable WDChecks. Make sure to enable/disable for the current workspace too. +* `languageServer.wdChecks`: to enable/disable WD (Well-Definedness) Checks. Make sure to enable/disable for the current workspace too. * `languageServer.strictChecks`: to enable/disable stricter Checks. Make sure to enable/disable for the current workspace too. +* `languageServer.performanceHints`: to enable/disable performance-related Hints. Make sure to enable/disable for the current workspace too. Please note that user settings overwrite workspace settings. diff --git a/package.json b/package.json index 0d10243cd549fed2aa30dd8ea312f3cdde567ba1..c0af141333aeb5fd907239563b7bc648cc7513a3 100644 --- a/package.json +++ b/package.json @@ -67,11 +67,11 @@ "default": false, "description": "Option for stricter Checks" }, - "languageServer.performanceInfo": { + "languageServer.performanceHints": { "scope": "window", "type": "boolean", - "default": false, - "description": "Option for preformance Info" + "default": true, + "description": "Option for performance-related Hints" } } } diff --git a/server/src/server.ts b/server/src/server.ts index 94090063d14d980c506962f6088b25a89608935f..deaf0cec2b9a418a223f4d64af8434a1e7a2223a 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -89,7 +89,7 @@ interface Settings { maxNumberOfProblems: number strictChecks : boolean wdChecks : boolean - performanceCheck : boolean + performanceHints : boolean probHome : string } @@ -99,7 +99,7 @@ const defaultSettings: Settings = { probHome: "~/prob_prolog/probcli.sh", strictChecks : false, wdChecks : false, - performanceCheck : false }; + performanceHints : false }; let globalSettings: Settings = defaultSettings; @@ -183,7 +183,7 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> { function getCommand(documentPath : string, errorPath : string, settings: Settings) : string{ let wdCmd = "" let strict = "" - let performanceCheck = "" + let perf = "" if(settings.wdChecks == true){ wdCmd = " -wd-check -release_java_parser " } @@ -192,11 +192,11 @@ function getCommand(documentPath : string, errorPath : string, settings: Setting strict = " -p STRICT_CLASH_CHECKING TRUE -p TYPE_CHECK_DEFINITIONS TRUE -lint " } - if(settings.strictChecks == true){ - performanceCheck = " -p PERFORMANCE_INFO TRUE " + if(settings.performanceHints == true){ + perf = " -p PERFORMANCE_INFO TRUE " } - return settings.probHome + ' -p MAX_INITIALISATIONS 0 -version ' + strict + wdCmd + performanceCheck + documentPath +" -p " + "NDJSON_ERROR_LOG_FILE " + errorPath + return settings.probHome + ' -p MAX_INITIALISATIONS 0 -version ' + perf + strict + wdCmd + documentPath +" -p " + "NDJSON_ERROR_LOG_FILE " + errorPath }