redhat-developer / redhat-developer/vscode-java
Intellisense not working when creating a submodule in a Gradle project unless reload vscode window
未关闭
还没有人认领这个 Issue。
Gradle
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用报告中描述的 Gradle 项目、settings.gradle.kts、build.gradle.kts 和 mylib/src/main/java/com/example/demo/MyClass.java 重现该问题。首先比较 Developer: Reload Window 前后的 IntelliSense,然后检查 Java 扩展如何处理新添加的子模块。当 MyClass.java 中的提示无需重新加载 VS Code 窗口即可正常工作时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- developer-experience, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 28/100