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
Been having problems with the code lens as when I am typing more code I am seeing the references pop away and back again, making the code move as a whole up and down which is quite annoying to see when typing.
Recently I got this error in the output:
[Error - 13:21:58] 07-Aug-2017 13:19:39 Problem resolving code lens
Index out of bounds
Java Model Exception: Java Model Status [Index out of bounds]
at org.eclipse.jdt.internal.core.Openable.codeSelect(Openable.java:158)
at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:377)
at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:371)
at org.eclipse.jdt.ls.core.internal.JDTUtils.findElementsAtSelection(JDTUtils.java:444)
at org.eclipse.jdt.ls.core.internal.JDTUtils.findElementAtSelection(JDTUtils.java:431)
at org.eclipse.jdt.ls.core.internal.handlers.CodeLensHandler.resolve(CodeLensHandler.java:76)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$12(JDTLanguageServer.java:352)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
The text was updated successfully, but these errors were encountered:
Yeah code lenses are recomputed every time the document changes, it's not ideal.
You can disable codeLenses in the preferences either via "editor.codeLens": false //disables all code lenses at the editor level
or "java.referencesCodeLens.enabled": false //only disables java reference code lenses "java.implementationsCodeLens.enabled": false //only disable java implementation code lenses
As for the Index Out of Bound exception, I see it occasionally too, I assume there's a race condition between updating the compilation unit during typing and recomputing code lenses. I think this should be handled in a separate ticket
Environment
Been having problems with the code lens as when I am typing more code I am seeing the references pop away and back again, making the code move as a whole up and down which is quite annoying to see when typing.
Recently I got this error in the output:
[Error - 13:21:58] 07-Aug-2017 13:19:39 Problem resolving code lens
Index out of bounds
Java Model Exception: Java Model Status [Index out of bounds]
at org.eclipse.jdt.internal.core.Openable.codeSelect(Openable.java:158)
at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:377)
at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:371)
at org.eclipse.jdt.ls.core.internal.JDTUtils.findElementsAtSelection(JDTUtils.java:444)
at org.eclipse.jdt.ls.core.internal.JDTUtils.findElementAtSelection(JDTUtils.java:431)
at org.eclipse.jdt.ls.core.internal.handlers.CodeLensHandler.resolve(CodeLensHandler.java:76)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$12(JDTLanguageServer.java:352)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
The text was updated successfully, but these errors were encountered: