vscode-java
vscode-java copied to clipboard
Intellisense not working when creating a submodule in a Gradle project unless reload vscode window
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.