From a96acfa77394bc1d080ed56c877475a1211de7ba Mon Sep 17 00:00:00 2001 From: aboyko Date: Sat, 13 Apr 2024 18:31:06 -0400 Subject: [PATCH 1/5] TokenType is 0 based according to LSP spec --- .../semanticTokens/SemanticTokensDataStreamProcessor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/semanticTokens/SemanticTokensDataStreamProcessor.java b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/semanticTokens/SemanticTokensDataStreamProcessor.java index b15ab212c..336a4cd76 100644 --- a/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/semanticTokens/SemanticTokensDataStreamProcessor.java +++ b/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/semanticTokens/SemanticTokensDataStreamProcessor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2022 Avaloq Group AG. + * Copyright (c) 2022, 2024 Avaloq Group AG. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -106,7 +106,7 @@ public SemanticTokensDataStreamProcessor(@NonNull final Function private String tokenType(final Integer data, final List legend) { try { - return legend.get(data - 1); + return legend.get(data); } catch (IndexOutOfBoundsException e) { return null; // no match } From 1e1cb383b0037c712aaa11668700e5d944a18b98 Mon Sep 17 00:00:00 2001 From: aboyko Date: Sun, 14 Apr 2024 01:31:59 -0400 Subject: [PATCH 2/5] Bump up plugin version --- org.eclipse.lsp4e/META-INF/MANIFEST.MF | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.lsp4e/META-INF/MANIFEST.MF b/org.eclipse.lsp4e/META-INF/MANIFEST.MF index e99685b81..ea0a88654 100644 --- a/org.eclipse.lsp4e/META-INF/MANIFEST.MF +++ b/org.eclipse.lsp4e/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Language Server Protocol client for Eclipse IDE (Incubation) Bundle-SymbolicName: org.eclipse.lsp4e;singleton:=true -Bundle-Version: 0.18.7.qualifier +Bundle-Version: 0.18.8.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-17 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.12.0", org.eclipse.equinox.common;bundle-version="3.8.0", From 0681e6fefd600bcb88146c97d56a0baa5f42db8a Mon Sep 17 00:00:00 2001 From: aboyko Date: Sun, 14 Apr 2024 01:42:50 -0400 Subject: [PATCH 3/5] Missing maven artifact version change --- org.eclipse.lsp4e/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.lsp4e/pom.xml b/org.eclipse.lsp4e/pom.xml index fb125cf92..ed7ba474b 100644 --- a/org.eclipse.lsp4e/pom.xml +++ b/org.eclipse.lsp4e/pom.xml @@ -7,7 +7,7 @@ org.eclipse.lsp4e eclipse-plugin - 0.18.7-SNAPSHOT + 0.18.8-SNAPSHOT From b5394b29339375b09ce8689fc240d229e289ff8b Mon Sep 17 00:00:00 2001 From: aboyko Date: Sun, 14 Apr 2024 02:11:04 -0400 Subject: [PATCH 4/5] Fix unit tests --- .../lsp4e/test/semanticTokens/SemanticTokensTestUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.eclipse.lsp4e.test/src/org/eclipse/lsp4e/test/semanticTokens/SemanticTokensTestUtil.java b/org.eclipse.lsp4e.test/src/org/eclipse/lsp4e/test/semanticTokens/SemanticTokensTestUtil.java index 70867a409..328547013 100644 --- a/org.eclipse.lsp4e.test/src/org/eclipse/lsp4e/test/semanticTokens/SemanticTokensTestUtil.java +++ b/org.eclipse.lsp4e.test/src/org/eclipse/lsp4e/test/semanticTokens/SemanticTokensTestUtil.java @@ -36,9 +36,9 @@ public class SemanticTokensTestUtil { public static List keywordSemanticTokens() { List> expectedTokens = new ArrayList<>(); - expectedTokens.add(Arrays.asList(0,0,4,1,0)); - expectedTokens.add(Arrays.asList(3,0,4,1,0)); - expectedTokens.add(Arrays.asList(0,9,7,1,0)); + expectedTokens.add(Arrays.asList(0,0,4,0,0)); + expectedTokens.add(Arrays.asList(3,0,4,0,0)); + expectedTokens.add(Arrays.asList(0,9,7,0,0)); return expectedTokens.stream().flatMap(List::stream).toList(); } From ac74e04862c370316beb8f59baf75be87a2c4de5 Mon Sep 17 00:00:00 2001 From: aboyko Date: Mon, 15 Apr 2024 12:29:46 -0400 Subject: [PATCH 5/5] Bump up test plugin and project versions. --- org.eclipse.lsp4e.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.lsp4e.test/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.lsp4e.test/META-INF/MANIFEST.MF b/org.eclipse.lsp4e.test/META-INF/MANIFEST.MF index 09ba9b9b8..4f834b739 100644 --- a/org.eclipse.lsp4e.test/META-INF/MANIFEST.MF +++ b/org.eclipse.lsp4e.test/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Tests for language server bundle (Incubation) Bundle-SymbolicName: org.eclipse.lsp4e.test;singleton:=true -Bundle-Version: 0.15.11.qualifier +Bundle-Version: 0.15.12.qualifier Fragment-Host: org.eclipse.lsp4e Bundle-Vendor: Eclipse.org Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/org.eclipse.lsp4e.test/pom.xml b/org.eclipse.lsp4e.test/pom.xml index 8242aa915..fc48e4541 100644 --- a/org.eclipse.lsp4e.test/pom.xml +++ b/org.eclipse.lsp4e.test/pom.xml @@ -8,7 +8,7 @@ org.eclipse.lsp4e.test eclipse-test-plugin - 0.15.11-SNAPSHOT + 0.15.12-SNAPSHOT