redhat-developer / redhat-developer/vscode-java
Renaming module folders is not synchronized with the Java Project Manager and may result in renaming ghost folders
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
Description: The Java Project Management view fails to synchronize with file system changes. When renaming a module folder via the file explorer, the Java Language Server does not detect or reflect the rename operation, resulting in a desynchronization between the project metadata and the actual file system state. The recreation of the old folder is a side effect of this synchronization failure.
Build Tool: Maven
OS: Windows 11 25H2
Steps to Reproduce:
- Open a workspace folder that contains multiple Java sub-projects (modules).
- Wait for the Java Language Server to finish importing and indexing all projects.
- Rename one of the sub-project folders (e.g., rename old-module-name to new-module-name) using the OS file
explorer or the IDE's built-in file tree. - Observe the Java Project Explorer/Manager view.
Actual Result:
- The Java Project Manager still displays old-module-name.
- The system recreates a new folder named old-module-name in the file system containing target and other
directories (side effect of the sync failure). - The new-module-name folder is treated as an unlinked plain folder rather than a Java module.
Expected Behavior:
- The Java Project Manager should detect the folder rename operation.
- The project metadata should be updated or re-indexed to reflect the name change, maintaining synchronization with
the file system.
Additional Context:
Running the command "Java: Clean Workspace Cache" and restarting the language server resolves the issue and
correctly reflects the new folder name. This confirms that the Language Server's cache retains stale file paths and
fails to monitor file system rename events, causing the desynchronization and subsequent side effects.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
复现导入 Java 项目后的重命名,然后从报告中描述的 Java: Clean Workspace Cache 命令和语言服务器同步行为开始。完成标准是 Java Project Manager 反映新的文件夹名称而不重新创建旧文件夹,并且重命名后的文件夹仍作为 Java 模块保持链接。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- developer-experience, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100