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 78af215c83039f1ab51ee357aa8dc488214d4a75..5bbc4c4a11bd88994052a35f2b20ae94adc666d1 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,12 @@ "type": "boolean", "default": false, "description": "Option for stricter Checks" + }, + "languageServer.performanceHints": { + "scope": "window", + "type": "boolean", + "default": true, + "description": "Option for performance-related Hints" } } }, diff --git a/server/src/server.ts b/server/src/server.ts index da95a955f402ea57a2be86e814ec5bc33ca3d909..f7ace0dae31855682541ccfefd58e66a246ddbb0 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -181,6 +181,7 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> { function getCommand(documentPath : string, errorPath : string, settings: Settings) : string{ let wdCmd = "" let strict = "" + let perf = "" if(settings.wdChecks == true){ wdCmd = " -wd-check -release_java_parser " } @@ -189,7 +190,11 @@ function getCommand(documentPath : string, errorPath : string, settings: Setting strict = " -p STRICT_CLASH_CHECKING TRUE -p TYPE_CHECK_DEFINITIONS TRUE -lint " } - return settings.probHome + ' -p MAX_INITIALISATIONS 0 -version ' + strict + wdCmd + documentPath +" -p " + "NDJSON_ERROR_LOG_FILE " + errorPath + if(settings.performanceHints == true){ + perf = " -p PERFORMANCE_INFO TRUE " + } + + return settings.probHome + ' -p MAX_INITIALISATIONS 0 -version ' + perf + strict + wdCmd + documentPath +" -p " + "NDJSON_ERROR_LOG_FILE " + errorPath }