redhat-developer / redhat-developer/vscode-java
Opened class files in referenced libraries are not restored on restart
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 547
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、workbench.editor.restoreEditors を有効にした状態でケースを再現します。Gradle Java プロジェクトを作成し、JAR 依存関係を追加し、Java Projects ビューからクラスを開いて、VS Code を再起動します。そのエディターを拡張機能と extension host がどのように処理するかを追跡します。再起動後に開いていたクラスファイルが復元されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100