From 6a33f8aac905f52c359f96cc4cf026158b574991 Mon Sep 17 00:00:00 2001 From: "Andrew J. Mauer" Date: Fri, 13 Oct 2023 18:10:16 +0100 Subject: [PATCH] Integrate re-structured LSP4Jakarta release in liberty-tools-vscode --- gulpfile.js | 7 +++---- package.json | 2 +- src/definitions/lsp4jakartaLSRequestNames.ts | 7 ++++--- src/extension.ts | 7 ++++--- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index c24a7647..22fffc3d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -5,8 +5,8 @@ const cp = require("child_process"); const libertyGroupId = "io.openliberty.tools"; const libertyVersion = "2.0.1"; const jakartaGroupId = "org.eclipse.lsp4jakarta"; -const jakartaVersion = "0.1.1"; -var releaseLevel = "releases"; //"snapshots"; //snapshots or releases +const jakartaVersion = "0.2.0-SNAPSHOT"; +var releaseLevel = "snapshots"; //"snapshots"; //snapshots or releases const libertyLemminxName = "liberty-langserver-lemminx-" + libertyVersion + "-jar-with-dependencies.jar"; const libertyLemminxDir = "../liberty-language-server/lemminx-liberty"; @@ -86,8 +86,7 @@ const jakartaGroupIdString = "&g=" + jakartaGroupId; const jakartaVersionString = "&v=" + jakartaVersion; const jakartaClassifierString = "&c=jar-with-dependencies"; -// const jakartaJDTURL = eclipseRepoURL + jakartaReleaseLevelString + jakartaGroupIdString + "&a=org.eclipse.lsp4jakarta.jdt.core" + jakartaVersionString; -const jakartaJDTURL = "https://download.eclipse.org/lsp4jakarta/releases/0.1.1/repository/plugins/org.eclipse.lsp4jakarta.jdt.core_0.1.1.20230614-1652.jar"; +const jakartaJDTURL = eclipseRepoURL + jakartaReleaseLevelString + jakartaGroupIdString + "&a=org.eclipse.lsp4jakarta.jdt.core" + jakartaVersionString; const jakartaLSURL = eclipseRepoURL + jakartaReleaseLevelString + jakartaGroupIdString + "&a=org.eclipse.lsp4jakarta.ls" + jakartaClassifierString + jakartaVersionString; gulp.task("downloadLSP4JakartaJars", (done) => { diff --git a/package.json b/package.json index 1fe42f0c..c2b16395 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ ], "contributes": { "javaExtensions": [ - "./jars/org.eclipse.lsp4jakarta.jdt.core-0.1.1.jar" + "./jars/org.eclipse.lsp4jakarta.jdt.core-0.2.0-SNAPSHOT.jar" ], "xml.javaExtensions": [ "./jars/liberty-langserver-lemminx-2.0.1-jar-with-dependencies.jar" diff --git a/src/definitions/lsp4jakartaLSRequestNames.ts b/src/definitions/lsp4jakartaLSRequestNames.ts index 4e692bd2..2c380e69 100644 --- a/src/definitions/lsp4jakartaLSRequestNames.ts +++ b/src/definitions/lsp4jakartaLSRequestNames.ts @@ -11,6 +11,7 @@ // Jakarta Language API export const JAVA_HOVER_REQUEST = "jakarta/java/hover"; export const JAVA_DIAGNOSTICS_REQUEST = "jakarta/java/diagnostics"; -export const JAVA_CLASSPATH_REQUEST = "jakarta/java/classpath"; -export const JAVA_CODEACTION_REQUEST = "jakarta/java/codeaction"; -export const JAVA_CURSORCONTEXT_REQUEST = "jakarta/java/cursorcontext"; \ No newline at end of file +export const JAVA_COMPLETION_REQUEST = "jakarta/java/completion"; +export const JAVA_CODEACTION_REQUEST = "jakarta/java/codeAction"; +export const JAVA_CODEACTION_RESOLVE_REQUEST = "jakarta/java/codeActionResolve"; +export const JAVA_PROJECT_LABELS_REQUEST = "jakarta/java/projectLabels"; diff --git a/src/extension.ts b/src/extension.ts index 768bacab..11b19f62 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -23,7 +23,7 @@ import { prepareExecutable } from "./util/javaServerStarter"; const LIBERTY_CLIENT_ID = "LANGUAGE_ID_LIBERTY"; const JAKARTA_CLIENT_ID = "LANGUAGE_ID_JAKARTA"; export const LIBERTY_LS_JAR = "liberty-langserver-2.0.1-jar-with-dependencies.jar"; -export const JAKARTA_LS_JAR = "org.eclipse.lsp4jakarta.ls-0.1.1-jar-with-dependencies.jar"; +export const JAKARTA_LS_JAR = "org.eclipse.lsp4jakarta.ls-0.2.0-SNAPSHOT-jar-with-dependencies.jar"; let libertyClient: LanguageClient; let jakartaClient: LanguageClient; @@ -76,10 +76,11 @@ export async function activate(context: vscode.ExtensionContext): Promise console.log("LSP4Jakarta is ready, binding requests..."); // Delegate requests from Jakarta LS to the Jakarta JDT core - bindRequest(lsp4jakartaLS.JAVA_CLASSPATH_REQUEST); + bindRequest(lsp4jakartaLS.JAVA_COMPLETION_REQUEST); bindRequest(lsp4jakartaLS.JAVA_CODEACTION_REQUEST); + bindRequest(lsp4jakartaLS.JAVA_CODEACTION_RESOLVE_REQUEST); bindRequest(lsp4jakartaLS.JAVA_DIAGNOSTICS_REQUEST); - bindRequest(lsp4jakartaLS.JAVA_CURSORCONTEXT_REQUEST); + bindRequest(lsp4jakartaLS.JAVA_PROJECT_LABELS_REQUEST); item.text = localize("jakarta.ls.thumbs.up"); item.tooltip = localize("jakarta.ls.started");