Skip to content

Commit 72c285e

Browse files
committed
Fix disabling JPQL support - properly turn off semantic highlighting
1 parent e0aaff6 commit 72c285e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/JdtSemanticTokensHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public JdtSemanticTokensHandler(CompilationUnitCache cuCache, JavaProjectFinder
5454
tokenProvidersList.add(tp);
5555
}
5656
}
57-
this.tokenProviders = tokenProviders;
57+
this.tokenProviders = tokenProvidersList;
5858
this.legend = new SemanticTokensLegend(
5959
tokenProviders.stream().flatMap(tp -> tp.getTokenTypes().stream()).distinct().collect(Collectors.toList()),
6060
tokenProviders.stream().flatMap(tp -> tp.getTokenModifiers().stream()).distinct().collect(Collectors.toList())
@@ -117,7 +117,7 @@ private List<SemanticTokenData> computeTokens(List<JdtSemanticTokensProvider> ap
117117
// If there are tokens computed then also run JDT LS tokens provider not to lose JDT LS semantic highlights
118118
cu.accept(jdtLsProvider.getTokensComputer(jp, cu, collector));
119119
}
120-
return collector.get();
120+
return collector.isEmpty() ? null : collector.get();
121121
}
122122

123123
}

0 commit comments

Comments
 (0)