redhat-developer / redhat-developer/vscode-java
Intellisense not working when creating a submodule in a Gradle project unless reload vscode window
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
Environment
- Operating System: Arch linux (Remote Development Host)
- JDK version: Gradle:
languageVersion.set(JavaLanguageVersion.of(8))/ System: 17 (installed bysdkman install java) - Visual Studio Code version:
1.80.2 - Java extension version:
v1.21.0
Steps To Reproduce
- create a new Gradle application project using
gradle initand using Kotlin DSL - making a new submodule
mkdir -p mylib/src/main/java/com/example/demo
touch mylib/src/main/java/com/example/demo/MyClass.java
# ... and writing some java code for this file
the content of mylib/src/main/java/com/example/demo/build.gradle.kts
plugins {
id("java")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
- add this submodule to
settings.gradle.kts
- include("app")
+ include("app", "mylib")
- now try to use this lib in app module, it works well, all prompt are working well
- open
mylib/src/main/java/com/example/demo/MyClass.java, try put some code to this file, but there are no any prompt (e.g. presssoutshould show a dropdown contains a snippet item forSystem.out.println, but there is no any on there) Ctrl+Shift+Pand then runningDeveloper: Reload Window, now all working well
Current Result
see above
Expected Result
see above
Additional Informations
I'm also using vscjava.vscode-gradle.
Please let me know if you can't reproduce this problem or need a log file, I'm busy for working and I will send some detail you need after work.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the Gradle project, settings.gradle.kts, build.gradle.kts, and mylib/src/main/java/com/example/demo/MyClass.java described in the report. Start by comparing IntelliSense before and after Developer: Reload Window, then inspect the Java extension's handling of the newly added submodule. Done means prompts work in MyClass.java without reloading the VS Code window.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100