Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate re-structured LSP4Jakarta 0.2.0 SNAPSHOT release in liberty-tools-vscode #296

Merged
merged 2 commits into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const cp = require("child_process");
const libertyGroupId = "io.openliberty.tools";
const libertyVersion = "2.1-SNAPSHOT";
const jakartaGroupId = "org.eclipse.lsp4jakarta";
const jakartaVersion = "0.1.1";
var releaseLevel = "snapshots"; //"releases"; //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";
Expand Down Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.1-SNAPSHOT-jar-with-dependencies.jar"
Expand Down
7 changes: 4 additions & 3 deletions src/definitions/lsp4jakartaLSRequestNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
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";
7 changes: 4 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.1-SNAPSHOT-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;
Expand Down Expand Up @@ -76,10 +76,11 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
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");
Expand Down