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 @@ ...@@ -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.
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
"contributes": { "contributes": {
"configuration": { "configuration": {
"type": "object", "type": "object",
"title": "Configuration", "title": "ProB Language Extension",
"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 enabeling (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": "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'; ...@@ -20,12 +20,12 @@ import { spawn } from 'child_process';
let client: LanguageClient; let client: LanguageClient;
let debugChannle: OutputChannel = null; let debugChannel: 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 (debugChannle == null) { if (debugChannel == null) {
debugChannle = window.createOutputChannel("ProB language server") debugChannel = 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: debugChannle, outputChannel: debugChannel,
} }
// Create the language client and start the client. // 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); 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) {
debugChannle.hide() debugChannel.hide()
} else { } else {
debugChannle.show() debugChannel.show()
} }
window.onDidOpenTerminal(() => { window.onDidOpenTerminal(() => {
showDebugMessages(debugChannle) showDebugMessages(debugChannel)
}) })
}) })
} }
function showDebugMessages(debugChannle: OutputChannel) { function showDebugMessages(debugChannel: OutputChannel) {
const debugMode: Boolean = workspace.getConfiguration("languageServer").get("debugMode") const debugMode: Boolean = workspace.getConfiguration("prob").get("debugMode")
if (debugMode) { if (debugMode) {
debugChannle.show() debugChannel.show()
} }
} }
...@@ -118,7 +118,3 @@ function toggleItem(editor: TextEditor, item) { ...@@ -118,7 +118,3 @@ function toggleItem(editor: TextEditor, item) {
item.hide(); item.hide();
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment