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

Update target platform to latest 4.31-I-builds. #2994

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

rgrunber
Copy link
Contributor

@rgrunber rgrunber commented Dec 7, 2023

This introduces the following notable improvements :

This introduces the following notable improvements :

- [21] JEP 430 String Templates support
- Performance improvement for "Organize Imports" when it calls
  "getStaticImportFavorites"
- Various refactorings to make API more accessible in
  jdt.core.manipulation

Signed-off-by: Roland Grunberg <[email protected]>
@rgrunber rgrunber added this to the End December 2023 milestone Dec 7, 2023
@rgrunber
Copy link
Contributor Author

rgrunber commented Dec 7, 2023

Just as a note, when one tries to use String templates, I do notice a lot of errors in the logs like :

!ENTRY org.eclipse.jdt.core.manipulation 4 2 2023-12-07 13:27:11.915
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jdt.core.manipulation".
!STACK 0
java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.core.dom.Expression.getStartPosition()" because "expression" is null
	at org.eclipse.jdt.core.dom.ASTConverter.convertToVariableDeclarationFragment(ASTConverter.java:4037)
	at org.eclipse.jdt.core.dom.ASTConverter.convertToVariableDeclarationStatement(ASTConverter.java:4115)
	at org.eclipse.jdt.core.dom.ASTConverter.checkAndAddMultipleLocalDeclaration(ASTConverter.java:544)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:736)
	at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations(ASTConverter.java:208)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:3439)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1521)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.convert(CompilationUnitResolver.java:344)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1265)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:867)
	at org.eclipse.jdt.core.manipulation.CoreASTProvider$1.run(CoreASTProvider.java:294)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jdt.core.manipulation.CoreASTProvider.createAST(CoreASTProvider.java:286)
	at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:199)
	at org.eclipse.jdt.ls.core.internal.handlers.CodeActionHandler.getASTRoot(CodeActionHandler.java:356)
	at org.eclipse.jdt.ls.core.internal.handlers.CodeActionHandler.getCodeActionCommands(CodeActionHandler.java:133)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$14(JDTLanguageServer.java:765)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

Likely an issue with the AST DOM not properly handling the String template elements yet. Hover does seem to work though as well as go-to definition.

@rgrunber rgrunber merged commit 936a964 into eclipse-jdtls:master Dec 7, 2023
7 checks passed
@rgrunber rgrunber deleted the update-tp branch December 7, 2023 18:33
@rgrunber rgrunber mentioned this pull request Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Add all imports" is inefficient when resolving static imports
1 participant