Skip to content
Snippets Groups Projects
Commit 7694620c authored by Jannik Dunkelau's avatar Jannik Dunkelau
Browse files

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
......@@ -3,6 +3,6 @@
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
}
}
This diff is collapsed.
......@@ -30,9 +30,9 @@
"contributes": {
"configuration": {
"type": "object",
"title": "Configuration",
"title": "ProB Language Extension",
"properties": {
"languageServer.proBHome": {
"prob.proBHome": {
"id": "1",
"title": "ProB Home",
"scope": "application",
......@@ -40,7 +40,7 @@
"default": "DEFAULT",
"description": "Path to ProB directory. Use 'DEFAULT' to access the shipped version."
},
"languageServer.wdChecks": {
"prob.wdChecks": {
"id": "2",
"title": "WD Checks",
"scope": "application",
......@@ -48,7 +48,7 @@
"default": true,
"description": "Option for WD Checks"
},
"languageServer.strictChecks": {
"prob.strictChecks": {
"id": "3",
"title": "Strict Checks",
"scope": "application",
......@@ -56,7 +56,7 @@
"default": true,
"description": "Option for stricter Checks"
},
"languageServer.performanceHints": {
"prob.performanceHints": {
"id": "4",
"title": "Performance Hints",
"scope": "application",
......@@ -64,21 +64,21 @@
"default": true,
"description": "Option for performance-related Hints"
},
"languageServer.debugMode": {
"prob.debugMode": {
"id": "5",
"title": "Debug Mode",
"scope": "application",
"type": "boolean",
"default": false,
"description": "Option for enabeling (extensiv) debug messages"
"description": "Option for enabling (extensiv) debug messages"
},
"common.javaHome": {
"prob.javaHome": {
"id": "6",
"title": "Java Home",
"scope": "application",
"type": "string",
"default": "java",
"description": "points to the java sdk responsible for executing the server"
"description": "Points to the java sdk responsible for executing the language server"
}
}
},
......
......@@ -20,12 +20,12 @@ import { spawn } from 'child_process';
let client: LanguageClient;
let debugChannle: OutputChannel = null;
let debugChannel: OutputChannel = null;
export function activate(context: ExtensionContext) {
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])
......@@ -51,8 +51,8 @@ export function activate(context: ExtensionContext) {
}
if (debugChannle == null) {
debugChannle = window.createOutputChannel("ProB language server")
if (debugChannel == null) {
debugChannel = window.createOutputChannel("ProB language server")
}
......@@ -64,12 +64,12 @@ export function activate(context: ExtensionContext) {
// Notify the server about file changes to '.clientrc files contained in the workspace
fileEvents: workspace.createFileSystemWatcher('**/.clientrc')
},
outputChannel: debugChannle,
outputChannel: debugChannel,
}
// Create the language client and start the client.
client = new LanguageClient('languageServer', 'languageServer', serverOptions, clientOptions)
client = new LanguageClient('probls', 'ProB Language Server', serverOptions, clientOptions)
let item = window.createStatusBarItem(StatusBarAlignment.Right, Number.MIN_VALUE);
......@@ -78,26 +78,26 @@ export function activate(context: ExtensionContext) {
client.start();
const debugMode: Boolean = workspace.getConfiguration("languageServer").get("debugMode")
const debugMode: Boolean = workspace.getConfiguration("prob").get("debugMode")
if (!debugMode) {
debugChannle.hide()
debugChannel.hide()
} else {
debugChannle.show()
debugChannel.show()
}
window.onDidOpenTerminal(() => {
showDebugMessages(debugChannle)
showDebugMessages(debugChannel)
})
})
}
function showDebugMessages(debugChannle: OutputChannel) {
const debugMode: Boolean = workspace.getConfiguration("languageServer").get("debugMode")
function showDebugMessages(debugChannel: OutputChannel) {
const debugMode: Boolean = workspace.getConfiguration("prob").get("debugMode")
if (debugMode) {
debugChannle.show()
debugChannel.show()
}
}
......@@ -118,7 +118,3 @@ function toggleItem(editor: TextEditor, item) {
item.hide();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment