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
7694620c
Commit
7694620c
authored
Mar 8, 2024
by
Jannik Dunkelau
Browse files
Options
Downloads
Patches
Plain Diff
Change settings prefix to `prob` instead of `languageServer`
parent
6d94393d
No related branches found
No related tags found
No related merge requests found
Pipeline
#131880
passed
Mar 8, 2024
Stage: test
Changes
4
Pipelines
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.vscode/settings.json
+2
-2
2 additions, 2 deletions
.vscode/settings.json
package-lock.json
+342
-252
342 additions, 252 deletions
package-lock.json
package.json
+9
-9
9 additions, 9 deletions
package.json
src/extension.ts
+15
-19
15 additions, 19 deletions
src/extension.ts
with
368 additions
and
282 deletions
.vscode/settings.json
+
2
−
2
View file @
7694620c
...
@@ -3,6 +3,6 @@
...
@@ -3,6 +3,6 @@
"typescript.tsc.autoDetect"
:
"off"
,
"typescript.tsc.autoDetect"
:
"off"
,
"typescript.preferences.quoteStyle"
:
"single"
,
"typescript.preferences.quoteStyle"
:
"single"
,
"editor.codeActionsOnSave"
:
{
"editor.codeActionsOnSave"
:
{
"source.fixAll.eslint"
:
true
"source.fixAll.eslint"
:
"explicit"
}
}
}
}
This diff is collapsed.
Click to expand it.
package-lock.json
+
342
−
252
View file @
7694620c
This diff is collapsed.
Click to expand it.
package.json
+
9
−
9
View file @
7694620c
...
@@ -30,9 +30,9 @@
...
@@ -30,9 +30,9 @@
"contributes"
:
{
"contributes"
:
{
"configuration"
:
{
"configuration"
:
{
"type"
:
"object"
,
"type"
:
"object"
,
"title"
:
"
Configurat
ion"
,
"title"
:
"
ProB Language Extens
ion"
,
"properties"
:
{
"properties"
:
{
"
languageServer
.proBHome"
:
{
"
prob
.proBHome"
:
{
"id"
:
"1"
,
"id"
:
"1"
,
"title"
:
"ProB Home"
,
"title"
:
"ProB Home"
,
"scope"
:
"application"
,
"scope"
:
"application"
,
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
"default"
:
"DEFAULT"
,
"default"
:
"DEFAULT"
,
"description"
:
"Path to ProB directory. Use 'DEFAULT' to access the shipped version."
"description"
:
"Path to ProB directory. Use 'DEFAULT' to access the shipped version."
},
},
"
languageServer
.wdChecks"
:
{
"
prob
.wdChecks"
:
{
"id"
:
"2"
,
"id"
:
"2"
,
"title"
:
"WD Checks"
,
"title"
:
"WD Checks"
,
"scope"
:
"application"
,
"scope"
:
"application"
,
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
"default"
:
true
,
"default"
:
true
,
"description"
:
"Option for WD Checks"
"description"
:
"Option for WD Checks"
},
},
"
languageServer
.strictChecks"
:
{
"
prob
.strictChecks"
:
{
"id"
:
"3"
,
"id"
:
"3"
,
"title"
:
"Strict Checks"
,
"title"
:
"Strict Checks"
,
"scope"
:
"application"
,
"scope"
:
"application"
,
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
"default"
:
true
,
"default"
:
true
,
"description"
:
"Option for stricter Checks"
"description"
:
"Option for stricter Checks"
},
},
"
languageServer
.performanceHints"
:
{
"
prob
.performanceHints"
:
{
"id"
:
"4"
,
"id"
:
"4"
,
"title"
:
"Performance Hints"
,
"title"
:
"Performance Hints"
,
"scope"
:
"application"
,
"scope"
:
"application"
,
...
@@ -64,21 +64,21 @@
...
@@ -64,21 +64,21 @@
"default"
:
true
,
"default"
:
true
,
"description"
:
"Option for performance-related Hints"
"description"
:
"Option for performance-related Hints"
},
},
"
languageServer
.debugMode"
:
{
"
prob
.debugMode"
:
{
"id"
:
"5"
,
"id"
:
"5"
,
"title"
:
"Debug Mode"
,
"title"
:
"Debug Mode"
,
"scope"
:
"application"
,
"scope"
:
"application"
,
"type"
:
"boolean"
,
"type"
:
"boolean"
,
"default"
:
false
,
"default"
:
false
,
"description"
:
"Option for enab
e
ling (extensiv) debug messages"
"description"
:
"Option for enabling (extensiv) debug messages"
},
},
"
common
.javaHome"
:
{
"
prob
.javaHome"
:
{
"id"
:
"6"
,
"id"
:
"6"
,
"title"
:
"Java Home"
,
"title"
:
"Java Home"
,
"scope"
:
"application"
,
"scope"
:
"application"
,
"type"
:
"string"
,
"type"
:
"string"
,
"default"
:
"java"
,
"default"
:
"java"
,
"description"
:
"
p
oints to the java sdk responsible for executing the server"
"description"
:
"
P
oints to the java sdk responsible for executing the
language
server"
}
}
}
}
},
},
...
...
This diff is collapsed.
Click to expand it.
src/extension.ts
+
15
−
19
View file @
7694620c
...
@@ -20,12 +20,12 @@ import { spawn } from 'child_process';
...
@@ -20,12 +20,12 @@ import { spawn } from 'child_process';
let
client
:
LanguageClient
;
let
client
:
LanguageClient
;
let
debugChann
l
e
:
OutputChannel
=
null
;
let
debugChanne
l
:
OutputChannel
=
null
;
export
function
activate
(
context
:
ExtensionContext
)
{
export
function
activate
(
context
:
ExtensionContext
)
{
const
serverHome
=
context
.
asAbsolutePath
(
"
b-language-server-all.jar
"
)
const
serverHome
=
context
.
asAbsolutePath
(
"
b-language-server-all.jar
"
)
const
javaHome
:
string
=
workspace
.
getConfiguration
(
"
common
"
).
get
(
"
javaHome
"
)
const
javaHome
:
string
=
workspace
.
getConfiguration
(
"
prob
"
).
get
(
"
javaHome
"
)
let
prc
=
spawn
(
javaHome
,
[
'
-jar
'
,
serverHome
])
let
prc
=
spawn
(
javaHome
,
[
'
-jar
'
,
serverHome
])
...
@@ -51,8 +51,8 @@ export function activate(context: ExtensionContext) {
...
@@ -51,8 +51,8 @@ export function activate(context: ExtensionContext) {
}
}
if
(
debugChann
l
e
==
null
)
{
if
(
debugChanne
l
==
null
)
{
debugChann
l
e
=
window
.
createOutputChannel
(
"
ProB language server
"
)
debugChanne
l
=
window
.
createOutputChannel
(
"
ProB language server
"
)
}
}
...
@@ -64,12 +64,12 @@ export function activate(context: ExtensionContext) {
...
@@ -64,12 +64,12 @@ export function activate(context: ExtensionContext) {
// Notify the server about file changes to '.clientrc files contained in the workspace
// Notify the server about file changes to '.clientrc files contained in the workspace
fileEvents
:
workspace
.
createFileSystemWatcher
(
'
**/.clientrc
'
)
fileEvents
:
workspace
.
createFileSystemWatcher
(
'
**/.clientrc
'
)
},
},
outputChannel
:
debugChann
l
e
,
outputChannel
:
debugChanne
l
,
}
}
// Create the language client and start the client.
// Create the language client and start the client.
client
=
new
LanguageClient
(
'
languageServer
'
,
'
l
anguageServer
'
,
serverOptions
,
clientOptions
)
client
=
new
LanguageClient
(
'
probls
'
,
'
ProB L
anguage
Server
'
,
serverOptions
,
clientOptions
)
let
item
=
window
.
createStatusBarItem
(
StatusBarAlignment
.
Right
,
Number
.
MIN_VALUE
);
let
item
=
window
.
createStatusBarItem
(
StatusBarAlignment
.
Right
,
Number
.
MIN_VALUE
);
...
@@ -78,26 +78,26 @@ export function activate(context: ExtensionContext) {
...
@@ -78,26 +78,26 @@ export function activate(context: ExtensionContext) {
client
.
start
();
client
.
start
();
const
debugMode
:
Boolean
=
workspace
.
getConfiguration
(
"
languageServer
"
).
get
(
"
debugMode
"
)
const
debugMode
:
Boolean
=
workspace
.
getConfiguration
(
"
prob
"
).
get
(
"
debugMode
"
)
if
(
!
debugMode
)
{
if
(
!
debugMode
)
{
debugChann
l
e
.
hide
()
debugChanne
l
.
hide
()
}
else
{
}
else
{
debugChann
l
e
.
show
()
debugChanne
l
.
show
()
}
}
window
.
onDidOpenTerminal
(()
=>
{
window
.
onDidOpenTerminal
(()
=>
{
showDebugMessages
(
debugChann
l
e
)
showDebugMessages
(
debugChanne
l
)
})
})
})
})
}
}
function
showDebugMessages
(
debugChann
l
e
:
OutputChannel
)
{
function
showDebugMessages
(
debugChanne
l
:
OutputChannel
)
{
const
debugMode
:
Boolean
=
workspace
.
getConfiguration
(
"
languageServer
"
).
get
(
"
debugMode
"
)
const
debugMode
:
Boolean
=
workspace
.
getConfiguration
(
"
prob
"
).
get
(
"
debugMode
"
)
if
(
debugMode
)
{
if
(
debugMode
)
{
debugChann
l
e
.
show
()
debugChanne
l
.
show
()
}
}
}
}
...
@@ -118,7 +118,3 @@ function toggleItem(editor: TextEditor, item) {
...
@@ -118,7 +118,3 @@ function toggleItem(editor: TextEditor, item) {
item
.
hide
();
item
.
hide
();
}
}
}
}
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