redhat-developer / redhat-developer/vscode-java
"No build tools" Java projects auto-import skipped due to presence of "build tools" Java projects in same workspace
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
Describe the bug
Java projects without build tools are being skipped during auto-import due to the presence of Java projects with build tools in the same workspace. This results in missing imports and project configuration issues.
To Reproduce
Steps to reproduce the behavior:
- Create a workspace containing both Java projects with build tools (e.g., Maven, Gradle) and Java projects without build tools.
- Clean the Java language server workspace to trigger auto-import on startup.
- The Java projects without build tools fail to auto-import properly or are ignored/skipped by the extension, as they are not visible in the list of projects to import and do not import at all when opening any Java file in such projects.
Expected behavior
Java projects without build tools should be available as options to select in the import java projects list, allowing a non-build-tooled Java project to be imported correctly instead of skipped.
Environment
- Operating System: Windows
- JDK version: 21
- Visual Studio Code version: 1.111.0
- Java extension version: 1.53.0
Additional Information
When opening a Java file in a Java project without build tools, it will be automatically imported and added to the Java projects list, therefore auto-importing works fine as long as build tools projects aren't in the same workspace.
The best solution seems to be to add these types of projects to the list of importable Java projects and allow selection of non-build-tooled projects.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在 Visual Studio Code 中使用同时包含 Maven 或 Gradle 项目以及不使用构建工具的项目的工作区重现该问题,然后清理 Java language server 工作区,以触发启动时的自动导入。跟踪可导入项目列表,并验证不使用构建工具的项目会出现在其中,并且无需先打开 Java 文件即可选择和导入这些项目。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, typescript, vscode
- 领域
- developer-experience, tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100