Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
B Language Extension
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
B Language Extension
Commits
f2164642
Commit
f2164642
authored
5 years ago
by
Michael Leuschel
Browse files
Options
Downloads
Patches
Plain Diff
add languageServer.performanceHints option
parent
9c5ce33a
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+2
-1
2 additions, 1 deletion
README.md
package.json
+6
-0
6 additions, 0 deletions
package.json
server/src/server.ts
+6
-1
6 additions, 1 deletion
server/src/server.ts
with
14 additions
and
2 deletions
README.md
+
2
−
1
View file @
f2164642
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
package.json
+
6
−
0
View file @
f2164642
...
@@ -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"
}
}
}
}
},
},
...
...
This diff is collapsed.
Click to expand it.
server/src/server.ts
+
6
−
1
View file @
f2164642
...
@@ -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
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment