redhat-developer / redhat-developer/vscode-java
Opened class files in referenced libraries are not restored on restart
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在启用 workbench.editor.restoreEditors 的情况下复现该问题:创建一个 Gradle Java 项目,添加一个 JAR 依赖项,从 Java Projects 视图中打开一个类,然后重启 VS Code。跟踪 extension 和 extension host 对该编辑器的处理;当打开的类文件在重启后得到恢复时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, typescript
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100