Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6917c43c33 | |||
|
|
1a0596ca71 |
Binary file not shown.
3099
Clients/VisualStudioCode/package-lock.json
generated
3099
Clients/VisualStudioCode/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
|||||||
"name": "java-tx-language-extension",
|
"name": "java-tx-language-extension",
|
||||||
"displayName": "Java-TX Language Extension",
|
"displayName": "Java-TX Language Extension",
|
||||||
"description": "The Language Extension for Java-TX with Typehints and Syntax Checks",
|
"description": "The Language Extension for Java-TX with Typehints and Syntax Checks",
|
||||||
"version": "0.0.14",
|
"version": "0.0.17",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.94.0"
|
"vscode": "^1.94.0"
|
||||||
},
|
},
|
||||||
@@ -20,6 +20,18 @@
|
|||||||
"command": "tx.restartLanguageServer",
|
"command": "tx.restartLanguageServer",
|
||||||
"title": "TX: Restart Language Server"
|
"title": "TX: Restart Language Server"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"configuration":[
|
||||||
|
{
|
||||||
|
"title": "JavaTX Language Server Plugin",
|
||||||
|
"properties": {
|
||||||
|
"tx.compilerLocation": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "file",
|
||||||
|
"description": "JavaTX Compiler Location"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -42,6 +54,7 @@
|
|||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@vscode/vsce": "^3.6.1",
|
||||||
"vscode-languageclient": "^9.0.1"
|
"vscode-languageclient": "^9.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import {
|
import {
|
||||||
|
Executable,
|
||||||
LanguageClient,
|
LanguageClient,
|
||||||
LanguageClientOptions,
|
LanguageClientOptions,
|
||||||
ServerOptions
|
ServerOptions
|
||||||
@@ -7,22 +8,24 @@ import {
|
|||||||
|
|
||||||
let client: LanguageClient | undefined; // <— global, damit wir neu starten können
|
let client: LanguageClient | undefined; // <— global, damit wir neu starten können
|
||||||
|
|
||||||
function createClient(context: vscode.ExtensionContext): LanguageClient {
|
function createClient(context: vscode.ExtensionContext): LanguageClient | null {
|
||||||
const workspaceFolder = context.extensionPath;
|
const workspaceFolder = context.extensionPath;
|
||||||
|
const config = vscode.workspace.getConfiguration("tx");
|
||||||
|
|
||||||
|
const compiler = config.get<string>("compilerLocation");
|
||||||
|
if (!compiler || compiler.trim() === "") {
|
||||||
|
vscode.window.showErrorMessage("Bitte konfiguriere den Pfad des Java-TX Compilers in den Einstellungen!");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const cmd: Executable = {
|
||||||
|
command: 'java',
|
||||||
|
args: ['-Xss10m', '-cp', `${compiler}:${workspaceFolder}/JavaTXLanguageServer-1.0-SNAPSHOT-jar-with-dependencies.jar`, "de.dhbw.JavaTXLanguageServerLauncher"],
|
||||||
|
};
|
||||||
|
|
||||||
const serverOptions: ServerOptions = {
|
const serverOptions: ServerOptions = {
|
||||||
run: {
|
run: cmd,
|
||||||
command: 'java',
|
debug: cmd
|
||||||
args: ['-Xss10m', '-jar', workspaceFolder + "/JavaTXLanguageServer-1.0-SNAPSHOT-jar-with-dependencies.jar"],
|
|
||||||
},
|
|
||||||
debug: {
|
|
||||||
command: 'java',
|
|
||||||
args: [
|
|
||||||
'-Xss10m',
|
|
||||||
'-jar',
|
|
||||||
workspaceFolder + '/JavaTXLanguageServer-1.0-SNAPSHOT-jar-with-dependencies.jar',
|
|
||||||
],
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const clientOptions: LanguageClientOptions = {
|
const clientOptions: LanguageClientOptions = {
|
||||||
@@ -42,7 +45,9 @@ function createClient(context: vscode.ExtensionContext): LanguageClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function activate(context: vscode.ExtensionContext) {
|
export async function activate(context: vscode.ExtensionContext) {
|
||||||
client = createClient(context);
|
const c = createClient(context);
|
||||||
|
if (!c) return;
|
||||||
|
client = c;
|
||||||
|
|
||||||
client.start()
|
client.start()
|
||||||
.then(() => console.log("Language Client erfolgreich gestartet"))
|
.then(() => console.log("Language Client erfolgreich gestartet"))
|
||||||
@@ -68,7 +73,9 @@ export async function activate(context: vscode.ExtensionContext) {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Fehler beim Stoppen des Language Clients:', e);
|
console.error('Fehler beim Stoppen des Language Clients:', e);
|
||||||
}
|
}
|
||||||
client = createClient(context); // komplett neu erzeugen
|
const c = createClient(context); // komplett neu erzeugen
|
||||||
|
if (!c) return;
|
||||||
|
client = c;
|
||||||
try {
|
try {
|
||||||
await client.start();
|
await client.start();
|
||||||
vscode.window.showInformationMessage('Java-TX Language Server neu gestartet.');
|
vscode.window.showInformationMessage('Java-TX Language Server neu gestartet.');
|
||||||
|
|||||||
@@ -14,61 +14,17 @@
|
|||||||
<version>4.11</version>
|
<version>4.11</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/org.antlr/antlr4 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.antlr</groupId>
|
|
||||||
<artifactId>antlr4</artifactId>
|
|
||||||
<version>4.11.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.github.java-diff-utils</groupId>
|
|
||||||
<artifactId>java-diff-utils</artifactId>
|
|
||||||
<version>4.12</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>log4j</groupId>
|
<groupId>log4j</groupId>
|
||||||
<artifactId>log4j</artifactId>
|
<artifactId>log4j</artifactId>
|
||||||
<version>1.2.17</version>
|
<version>1.2.17</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
|
||||||
<artifactId>log4j-api</artifactId>
|
|
||||||
<version>2.20.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
|
||||||
<artifactId>log4j-core</artifactId>
|
|
||||||
<version>2.20.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit-jupiter</artifactId>
|
<artifactId>junit-jupiter</artifactId>
|
||||||
<version>5.10.0</version>
|
<version>5.14.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>commons-io</groupId>
|
|
||||||
<artifactId>commons-io</artifactId>
|
|
||||||
<version>2.6</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.github.classgraph</groupId>
|
|
||||||
<artifactId>classgraph</artifactId>
|
|
||||||
<version>4.8.172</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.guava</groupId>
|
|
||||||
<artifactId>guava</artifactId>
|
|
||||||
<version>33.2.0-jre</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.ow2.asm/asm -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ow2.asm</groupId>
|
|
||||||
<artifactId>asm</artifactId>
|
|
||||||
<version>9.5</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.lsp4j</groupId>
|
<groupId>org.eclipse.lsp4j</groupId>
|
||||||
<artifactId>org.eclipse.lsp4j</artifactId>
|
<artifactId>org.eclipse.lsp4j</artifactId>
|
||||||
@@ -78,6 +34,7 @@
|
|||||||
<groupId>de.dhbwstuttgart</groupId>
|
<groupId>de.dhbwstuttgart</groupId>
|
||||||
<artifactId>JavaTXcompiler</artifactId>
|
<artifactId>JavaTXcompiler</artifactId>
|
||||||
<version>0.1</version>
|
<version>0.1</version>
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
Reference in New Issue
Block a user