Skip to content

Commit

Permalink
Merge branch 'lsp4ij-market-0.4.0-integration'
Browse files Browse the repository at this point in the history
  • Loading branch information
anusreelakshmi934 committed Aug 27, 2024
2 parents 7429a24 + eca1e40 commit 38317da
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ on:
push:
branches: '**'
pull_request:
branches: [ main, lsp4ij-market-0.3.0-integration ]
branches: [ main, lsp4ij-market-0.4.0-integration ]

jobs:
build:
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ targetCompatibility = 17

def remoteRobotVersion = "0.11.18"
// To switch to nightly version, add @nightly to the version number.
def lsp4ijVersion = '0.3.0'
def lsp4ijVersion = '0.4.0'

repositories {
mavenCentral()
Expand Down Expand Up @@ -111,7 +111,7 @@ dependencies {
testImplementation 'com.automation-remarks:video-recorder-junit5:2.0'

// define jars to grab locally (if falling back to mavenLocal() repo)
lsp('org.eclipse.lsp4mp:org.eclipse.lsp4mp.ls:0.10.0:uber') {
lsp('org.eclipse.lsp4mp:org.eclipse.lsp4mp.ls:0.12.0-SNAPSHOT:uber') {
transitive = false
}
lsp('org.eclipse.lemminx:org.eclipse.lemminx:0.26.1:uber') {
Expand Down Expand Up @@ -143,7 +143,7 @@ runIde {

intellij {
// For a full list of IntelliJ IDEA releases please see https://www.jetbrains.com/intellij-repository/releases
version = '2024.1.3'
version = '2024.1.6'

def lsp4ij = project.hasProperty('useLocal') && project.property('useLocal') == 'true' ?
file("../lsp4ij/build/distributions/LSP4IJ/") :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.openapi.vfs.VirtualFile;
import com.redhat.devtools.lsp4ij.JSONUtils;
import io.openliberty.tools.intellij.lsp4jakarta.lsp4ij.PropertiesManagerForJakarta;
import io.openliberty.tools.intellij.lsp4mp.MicroProfileProjectService;
import io.openliberty.tools.intellij.lsp4mp4ij.psi.core.ProjectLabelManager;
Expand All @@ -34,7 +35,6 @@
import org.eclipse.lsp4mp.commons.MicroProfileJavaFileInfoParams;
import org.eclipse.lsp4mp.commons.MicroProfileJavaProjectLabelsParams;
import org.eclipse.lsp4mp.commons.codeaction.CodeActionResolveData;
import org.eclipse.lsp4mp.commons.utils.JSONUtility;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -74,7 +74,7 @@ public CompletableFuture<CodeAction> resolveCodeAction(CodeAction codeAction) {
final IPsiUtils utils = PsiUtilsLSImpl.getInstance(getProject());
final var coalesceBy = new CoalesceByKey("jakarta/java/resolveCodeAction");
return runAsBackground("Computing Java resolve code actions", monitor -> {
final CodeActionResolveData data = JSONUtility.toModel(codeAction.getData(), CodeActionResolveData.class);
final CodeActionResolveData data = JSONUtils.toModel(codeAction.getData(), CodeActionResolveData.class);
codeAction.setData(data);
return PropertiesManagerForJakarta.getInstance().resolveCodeAction(codeAction, utils);
}, coalesceBy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ public CodeAction resolveCodeAction(JavaCodeActionResolveContext context) {
int paramIndex;

if (data.getExtendedDataEntry(ANNOTATION_TO_REMOVE) instanceof List &&
data.getExtendedDataEntry(INDEX_KEY) instanceof Integer) {
data.getExtendedDataEntry(INDEX_KEY) instanceof Number) {
annotationsToRemove = (List<String>) data.getExtendedDataEntry(ANNOTATION_TO_REMOVE);
paramIndex = (Integer) data.getExtendedDataEntry(INDEX_KEY);
paramIndex = ((Number) data.getExtendedDataEntry(INDEX_KEY)).intValue();
} else {
LOGGER.log(Level.WARNING, "The CodeActionResolveData was corrupted somewhere in the LSP layer. Unable to resolve code action.");
return null;
Expand Down

0 comments on commit 38317da

Please sign in to comment.