You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When #880 will be implemented, when we hover to root element a, we should see several code action, but there are no code actions:
We have a the following stack traces:
[Error - 12:25:10] Request textDocument/codeAction failed.
Message: Internal error.
Code: -32603
java.util.concurrent.CompletionException: java.lang.NullPointerException
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
at java.base/java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1238)
at java.base/java.util.concurrent.CompletableFuture$BiApply.tryFire(CompletableFuture.java:1205)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:479)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: java.lang.NullPointerException
at java.base/java.lang.StringBuilder.<init>(StringBuilder.java:124)
at org.eclipse.lemminx.utils.XMLBuilder.trimTrailingSpacesEachLine(XMLBuilder.java:374)
at org.eclipse.lemminx.utils.XMLBuilder.addContent(XMLBuilder.java:303)
at org.eclipse.lemminx.utils.XMLBuilder.addContent(XMLBuilder.java:277)
at org.eclipse.lemminx.extensions.generators.xml2dtd.XML2DTDGenerator.generate(XML2DTDGenerator.java:96)
at org.eclipse.lemminx.extensions.generators.xml2dtd.XML2DTDGenerator.generate(XML2DTDGenerator.java:29)
at org.eclipse.lemminx.extensions.generators.AbstractXML2GrammarGenerator.doGenerate(AbstractXML2GrammarGenerator.java:67)
at org.eclipse.lemminx.extensions.generators.AbstractXML2GrammarGenerator.generate(AbstractXML2GrammarGenerator.java:47)
at org.eclipse.lemminx.extensions.generators.AbstractXML2GrammarGenerator.generate(AbstractXML2GrammarGenerator.java:40)
at org.eclipse.lemminx.extensions.generators.FileContentGeneratorManager.generate(FileContentGeneratorManager.java:88)
at org.eclipse.lemminx.extensions.contentmodel.participants.codeactions.NoGrammarConstraintsCodeAction.doCodeAction(NoGrammarConstraintsCodeAction.java:93)
at org.eclipse.lemminx.extensions.contentmodel.participants.ContentModelCodeActionParticipant.doCodeAction(ContentModelCodeActionParticipant.java:49)
at org.eclipse.lemminx.services.XMLCodeActions.doCodeActions(XMLCodeActions.java:45)
at org.eclipse.lemminx.services.XMLLanguageService.doCodeActions(XMLLanguageService.java:255)
at org.eclipse.lemminx.XMLTextDocumentService.lambda$codeAction$19(XMLTextDocumentService.java:389)
at java.base/java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1236)
... 7 more
This issue comes from the </ which have a null local name.
To fix correctly this issue, we should:
try catch each code action to display code action which doesn't throw exception.
fix the DTD generator to take care of element which have null tag name.
The text was updated successfully, but these errors were encountered:
Given this XML:
When #880 will be implemented, when we hover to root element a, we should see several code action, but there are no code actions:
We have a the following stack traces:
This issue comes from the
</
which have a null local name.To fix correctly this issue, we should:
The text was updated successfully, but these errors were encountered: