Skip to content
Snippets Groups Projects
Commit f2164642 authored by Michael Leuschel's avatar Michael Leuschel
Browse files

add languageServer.performanceHints option

parent 9c5ce33a
No related branches found
No related tags found
No related merge requests found
...@@ -18,8 +18,9 @@ Compiler support for b/eventb via ProB. You need a nightly build of ProB to full ...@@ -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: This extension contributes the following settings:
* `languageServer.probHome`: to set the path to ProB * `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.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. Please note that user settings overwrite workspace settings.
......
...@@ -67,6 +67,12 @@ ...@@ -67,6 +67,12 @@
"type": "boolean", "type": "boolean",
"default": false, "default": false,
"description": "Option for stricter Checks" "description": "Option for stricter Checks"
},
"languageServer.performanceHints": {
"scope": "window",
"type": "boolean",
"default": true,
"description": "Option for performance-related Hints"
} }
} }
}, },
......
...@@ -181,6 +181,7 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> { ...@@ -181,6 +181,7 @@ async function validateTextDocument(textDocument: TextDocument): Promise<void> {
function getCommand(documentPath : string, errorPath : string, settings: Settings) : string{ function getCommand(documentPath : string, errorPath : string, settings: Settings) : string{
let wdCmd = "" let wdCmd = ""
let strict = "" let strict = ""
let perf = ""
if(settings.wdChecks == true){ if(settings.wdChecks == true){
wdCmd = " -wd-check -release_java_parser " wdCmd = " -wd-check -release_java_parser "
} }
...@@ -189,7 +190,11 @@ function getCommand(documentPath : string, errorPath : string, settings: Setting ...@@ -189,7 +190,11 @@ function getCommand(documentPath : string, errorPath : string, settings: Setting
strict = " -p STRICT_CLASH_CHECKING TRUE -p TYPE_CHECK_DEFINITIONS TRUE -lint " 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
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment