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
70a9629d
Commit
70a9629d
authored
4 years ago
by
SeeBasTStick
Browse files
Options
Downloads
Patches
Plain Diff
prepared version 1.0
parent
316648e4
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
src/extension.ts
+10
-4
10 additions, 4 deletions
src/extension.ts
with
11 additions
and
5 deletions
README.md
+
1
−
1
View file @
70a9629d
...
@@ -11,7 +11,7 @@ Compiler support for B via ProB. You need a nightly build of ProB to fully use t
...
@@ -11,7 +11,7 @@ Compiler support for B via ProB. You need a nightly build of ProB to fully use t
## Requirements
## Requirements
-
Latest nightly build of ProB.
-
Latest nightly build of ProB.
-
Java v.
11
or higher
-
Java v.
8
or higher
. By default java home is considerd to be accesseble by 'java' in terminal/powershell
## Extension Settings
## Extension Settings
...
...
This diff is collapsed.
Click to expand it.
src/extension.ts
+
10
−
4
View file @
70a9629d
...
@@ -12,21 +12,27 @@ import {
...
@@ -12,21 +12,27 @@ import {
LanguageClientOptions
,
LanguageClientOptions
,
ServerOptions
,
ServerOptions
,
}
from
'
vscode-languageclient
'
;
}
from
'
vscode-languageclient
'
;
import
fs
from
"
fs
"
import
*
as
path
from
'
path
'
let
client
:
LanguageClient
;
let
client
:
LanguageClient
;
export
function
activate
(
context
:
ExtensionContext
)
{
export
function
activate
(
context
:
ExtensionContext
)
{
const
serverHome
=
context
.
asAbsolutePath
(
path
.
join
(
'
node_modules
'
,
'
b-language-server
'
,
'
build
'
,
'
libs
'
,
'
b-language-server-all.jar
'
))
//const serverHome = "/home/sebastian/IdeaProjects/b-language-server/build/libs/b-language-server-all.jar"
const
javaHome
:
string
=
workspace
.
getConfiguration
(
"
common
"
).
get
(
"
javaHome
"
)
let
serverOptions
:
ServerOptions
=
{
let
serverOptions
:
ServerOptions
=
{
command
:
'
/usr/bin/java
'
,
command
:
javaHome
,
args
:
[
"
-jar
"
,
"
./node_modules/b-language-server/build/libs/b-language-server-all.jar
"
]
args
:
[
"
-jar
"
,
serverHome
]
};
};
let
debugChannle
=
window
.
createOutputChannel
(
"
ProB language server
"
)
let
debugChannle
=
window
.
createOutputChannel
(
"
ProB language server
"
)
debugChannle
.
appendLine
(
"
starting server at <
"
+
javaHome
+
"
-jar
"
+
serverHome
+
"
>
"
)
debugChannle
.
appendLine
(
"
fs exits
"
+
fs
.
existsSync
(
serverHome
))
// Options to control the language client
// Options to control the language client
let
clientOptions
:
LanguageClientOptions
=
{
let
clientOptions
:
LanguageClientOptions
=
{
// Register the server for B files
// Register the server for B files
...
...
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