Skip to content
Snippets Groups Projects
Commit f1de5382 authored by SeeBasTStick's avatar SeeBasTStick
Browse files

minor clean up

parent ddd1eecc
No related branches found
No related tags found
No related merge requests found
......@@ -250,8 +250,8 @@
"integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0="
},
"b-language-server": {
"version": "https://github.com/SeeBasTStick/b-language-server/archive/v2.0.2.tar.gz",
"integrity": "sha512-ZgexzCtfT3Vfr4isZU3ypSszriNaCW4HsKdH+cXBuqfAN+pXE3wqH/uKz2Rw+TzNBy3m6FockjHqDDZXrU1x/A=="
"version": "https://github.com/SeeBasTStick/b-language-server/archive/v2.0.5.tar.gz",
"integrity": "sha512-TIDJVHo8A6T4/gIjrJnzxvMIxISAWLRsgKWTkYrFxWWcJkE4fZMzEiT5I+j8HY3y/5aiLZ6pHUynuTJmqaV+2g=="
},
"balanced-match": {
"version": "1.0.0",
......@@ -264,6 +264,11 @@
"integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==",
"dev": true
},
"bluebird": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz",
"integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
......@@ -451,6 +456,11 @@
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
......@@ -1496,6 +1506,31 @@
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
"dev": true
},
"portastic": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/portastic/-/portastic-1.0.1.tgz",
"integrity": "sha1-HJgF1D+uj2pAzw28d5QJGi6dDSo=",
"requires": {
"bluebird": "^2.9.34",
"commander": "^2.8.1",
"debug": "^2.2.0"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"prelude-ls": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
......
......@@ -4,7 +4,7 @@ import {
window,
TextEditor,
StatusBarAlignment,
OutputChannel
OutputChannel,
} from 'vscode';
......@@ -18,7 +18,7 @@ import {
import * as net from 'net';
import * as path from 'path'
import { spawn, spawnSync } from 'child_process';
import { spawn } from 'child_process';
let client: LanguageClient;
......@@ -30,18 +30,19 @@ export function activate(context: ExtensionContext) {
const javaHome: string = workspace.getConfiguration("common").get("javaHome")
//Start the server
// comment the two lines (and the closing brackets) if you want to run a server by hand -> for developing
let prc = spawn(javaHome, ['-jar', serverHome])
prc.stdout.on('data', function (data) {
prc.stdout.on('data', function (data : Buffer) {
let portAsStringWithBrackets : String = data.toString()
let closingBracketPos : number = portAsStringWithBrackets.indexOf(">")
let portNumber : number = parseInt(portAsStringWithBrackets.substring(1, closingBracketPos))
let connectionInfo = {
port: 55556,
port: portNumber,
}
let serverOptions: ServerOptions = () => {
let socket = net.connect(connectionInfo);
let result: StreamInfo = {
......@@ -52,13 +53,11 @@ export function activate(context: ExtensionContext) {
}
if (debugChannle == null) {
debugChannle = window.createOutputChannel("ProB language server")
}
//debugChannle.appendLine("fs exits " + fs.existsSync(serverHome))
// Options to control the language client
let clientOptions: LanguageClientOptions = {
// Register the server for B files
......@@ -76,21 +75,12 @@ export function activate(context: ExtensionContext) {
let item = window.createStatusBarItem(StatusBarAlignment.Right, Number.MIN_VALUE);
debugChannle.appendLine("starting server: " + javaHome + " -jar " + serverHome)
item.text = 'Starting ProB LSP...';
toggleItem(window.activeTextEditor, item);
// Start the clienServert. This will also launch the server
let disposable = client.start();
context.subscriptions.push(disposable);
console.log( workspace.getConfiguration())
console.log( workspace.getConfiguration("languageServer"))
const debugMode: Boolean = workspace.getConfiguration("languageServer").get("debugMode")
if (!debugMode) {
debugChannle.hide()
......@@ -105,7 +95,6 @@ export function activate(context: ExtensionContext) {
})
})
}
function showDebugMessages(debugChannle: OutputChannel) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment