redhat-developer / redhat-developer/vscode-java

Some completions available in lightweight mode aren't available in standard mode

Open
#3,938 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

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:

  1. Create a superclass with a method and implement it on a subclass
  2. Either type out the name of the method, or use intellisense to find it
  3. Control + space again to bring up intellisense
  4. 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:
Image

Standard mode:
Image

The method:
Image

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the superclass/subclass scenario in VS Code, comparing completion results in lightweight and standard modes. Start by reviewing the JDT LS stack-trace locations, including BundleUtils.startBundle and FoldingRangeHandler, alongside the reported completion behavior; done means standard mode offers the same method-stub completions as lightweight mode without the logged failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
developer-experience, devtools, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.