redhat-developer / redhat-developer/vscode-java
Opened class files in referenced libraries are not restored on restart
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 547
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
Description
When workbench.editor.restoreEditors is enabled, opened project files are restored across VSCode restarts, but this does not work with opened class files from a referenced library.
This is fairly annoying when a project significantly involves some source-unavailable library.
To Reproduce
- Ensure
workbench.editor.restoreEditorsis enabled - Create a Java project (e.g. using Gradle)
- Add a JAR dependency
- Open a class file from the dependency in the "Java Projects" view
- Restart VSCode - The class file editor is not present
Having looked at trace-level logs for both this extension and the VSCode extension host, I do not believe they contain any useful information here (no clear consistent error message that seems related to this, and the class file itself is only mentioned once by this extension in the context of a large list of other classfiles that were not open prior to the restart). This issue has also persisted across multiple extension versions and devices, so I highly doubt it is a environment-related issue.
Expected behavior
The opened classfiles should remain open through restarts when workbench.editor.restoreEditors is enabled.
Environment
- Operating System: Windows 11
- JDK version: Oracle Java 24.0.2
- Visual Studio Code version: 1.117.0
- Java extension version: 1.54.0
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
Bắt đầu bằng cách tái hiện trường hợp với workbench.editor.restoreEditors được bật: tạo một dự án Java Gradle, thêm một dependency JAR, mở một class từ chế độ xem Java Projects và khởi động lại VS Code. Theo dõi cách extension và extension host xử lý editor đó; hoàn tất khi file class đã mở được khôi phục sau khi khởi động lại.
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, typescript
- Lĩnh vực
- tooling
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100