redhat-developer / redhat-developer/vscode-java
Some completions available in lightweight mode aren't available in standard mode
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 546
- Merge medio
- 20h 1m
- PR unite (30g)
- 11
Descrizione
This extension decided to start acting up for no reason. I thought that maybe one of the cache/data files got corrupted somehow, so I removed every vscode-related file I could find and reinstalled everything, but it was still acting up. It's been very finicky, but the most reliably-broken feature I've seen is that some completions aren't available when they should be - mainly expanding a method name into a method stub.
I tried several old extension versions that worked previously and they also refused to work properly. I typically use vscodium, but I've also tried with vscode proper and its open source release. I'm not sure what else I can try, every log I can find hasn't been very helpful.
Steps to reproduce:
- Create a superclass with a method and implement it on a subclass
- Either type out the name of the method, or use intellisense to find it
- Control + space again to bring up intellisense
- In lightweight mode, there will be one or more completions that expand to a stub version of the method. In standard mode, there aren't any completions available
Lightweight mode:
Standard mode:
The method:
Syntax server logs:
WARNING: Using incubator modules: jdk.incubator.vector
[Error - 4:05:59 PM] Jan 29, 2025, 4:05:59 PM An internal error occurred during: "Initialize After Load".
Cannot invoke "org.osgi.framework.Bundle.start(int)" because the return value of "org.eclipse.core.runtime.Platform.getBundle(String)" is null
java.lang.NullPointerException: Cannot invoke "org.osgi.framework.Bundle.start(int)" because the return value of "org.eclipse.core.runtime.Platform.getBundle(String)" is null
at org.eclipse.jdt.ls.core.internal.handlers.BundleUtils.startBundle(BundleUtils.java:360)
at org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin$1.run(JavaLanguageServerPlugin.java:196)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
[Error - 4:06:04 PM] Jan 29, 2025, 4:06:04 PM Problem with folding range for /jdt.ls-java-project/src/gregtech/common/tileentities/machines/MTEHatchCraftingInputME.java
MTEHatchCraftingInputME.java [in gregtech.common.tileentities.machines [in src [in jdt.ls-java-project]]] does not exist
Java Model Exception: Error in Java Model (code 969): MTEHatchCraftingInputME.java [in gregtech.common.tileentities.machines [in src [in jdt.ls-java-project]]] does not exist
at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:556)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:234)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:569)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:292)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:278)
at org.eclipse.jdt.internal.core.CompilationUnit.getSourceRange(CompilationUnit.java:1085)
at org.eclipse.jdt.ls.core.internal.handlers.FoldingRangeHandler.computeFoldingRanges(FoldingRangeHandler.java:79)
at org.eclipse.jdt.ls.core.internal.handlers.FoldingRangeHandler.foldingRange(FoldingRangeHandler.java:70)
at org.eclipse.jdt.ls.core.internal.syntaxserver.SyntaxLanguageServer.lambda$8(SyntaxLanguageServer.java:376)
at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
Extension host logs:
2025-01-29 16:06:22.526 [error] [redhat.java] provider FAILED
2025-01-29 16:06:22.543 [error] Error: The request (id: 14, method: 'textDocument/hover') has been cancelled
at /home/[redacted]/.vscode/extensions/redhat.java-1.39.0-linux-x64/dist/extension.js:2:1066478
at re (/home/[redacted]/.vscode/extensions/redhat.java-1.39.0-linux-x64/dist/extension.js:2:1066772)
at /home/[redacted]/.vscode/extensions/redhat.java-1.39.0-linux-x64/dist/extension.js:2:1061556
at Immediate.<anonymous> (/home/[redacted]/.vscode/extensions/redhat.java-1.39.0-linux-x64/dist/extension.js:2:1061576)
at process.processImmediate (node:internal/timers:483:21)
2025-01-29 16:06:34.678 [error] [redhat.java] provider FAILED
2025-01-29 16:06:34.678 [error] Error: The request (id: 24, method: 'textDocument/hover') has been cancelled
at /home/[redacted]/.vscode/extensions/redhat.java-1.39.0-linux-x64/dist/extension.js:2:1066478
at re (/home/[redacted]/.vscode/extensions/redhat.java-1.39.0-linux-x64/dist/extension.js:2:1066772)
at /home/[redacted]/.vscode/extensions/redhat.java-1.39.0-linux-x64/dist/extension.js:2:1061556
at Immediate.<anonymous> (/home/[redacted]/.vscode/extensions/redhat.java-1.39.0-linux-x64/dist/extension.js:2:1061576)
at process.processImmediate (node:internal/timers:483:21)
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci lo scenario di superclasse/sottoclasse in VS Code, confrontando i risultati del completamento nelle modalità leggera e standard. Inizia esaminando le posizioni dello stack trace di JDT LS, incluse BundleUtils.startBundle e FoldingRangeHandler, insieme al comportamento di completamento segnalato; il lavoro è completo quando la modalità standard offre gli stessi completamenti di stub di metodo della modalità leggera senza i fallimenti registrati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, typescript, vscode
- Ambito
- developer-experience, devtools, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100