redhat-developer / redhat-developer/vscode-java
Renaming module folders is not synchronized with the Java Project Manager and may result in renaming ghost folders
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 546
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện việc đổi tên sau khi nhập dự án Java, sau đó bắt đầu với hành vi của lệnh Java: Clean Workspace Cache và việc đồng bộ hóa language server được mô tả trong báo cáo. Được xem là hoàn tất khi Java Project Manager phản ánh tên thư mục mới mà không tạo lại thư mục cũ, và thư mục đã đổi tên vẫn được liên kết dưới dạng một module Java.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, vscode
- Lĩnh vực
- developer-experience, tooling
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100