redhat-developer / redhat-developer/vscode-java

Opened class files in referenced libraries are not restored on restart

Aperta
#4,406 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug
Lingua principale
TypeScript
Stelle
2.3k
Fork
546
Merge medio
20h 1m
PR unite (30g)
11

Descrizione

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

  1. Ensure workbench.editor.restoreEditors is enabled
  2. Create a Java project (e.g. using Gradle)
  3. Add a JAR dependency
  4. Open a class file from the dependency in the "Java Projects" view
  5. 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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il caso con workbench.editor.restoreEditors abilitato: crea un progetto Java Gradle, aggiungi una dipendenza JAR, apri una classe dalla vista Java Projects e riavvia VS Code. Traccia la gestione di quell'editor da parte dell'estensione e dell'extension host; il lavoro è completato quando il file di classe aperto viene ripristinato dopo il riavvio.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, typescript
Ambito
tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.