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.restoreEditors is 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
Description
When
workbench.editor.restoreEditorsis 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
workbench.editor.restoreEditorsis enabledHaving 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.restoreEditorsis enabled.Environment