redhat-developer / redhat-developer/vscode-java

Renaming module folders is not synchronized with the Java Project Manager and may result in renaming ghost folders

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

Nessuno ha ancora preso questa issue.

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

Descrizione

Description: The Java Project Management view fails to synchronize with file system changes. When renaming a module folder via the file explorer, the Java Language Server does not detect or reflect the rename operation, resulting in a desynchronization between the project metadata and the actual file system state. The recreation of the old folder is a side effect of this synchronization failure.

Build Tool: Maven
OS: Windows 11 25H2

Steps to Reproduce:

  1. Open a workspace folder that contains multiple Java sub-projects (modules).
  2. Wait for the Java Language Server to finish importing and indexing all projects.
  3. Rename one of the sub-project folders (e.g., rename old-module-name to new-module-name) using the OS file
    explorer or the IDE's built-in file tree.
  4. Observe the Java Project Explorer/Manager view.

Actual Result:

  • The Java Project Manager still displays old-module-name.
  • The system recreates a new folder named old-module-name in the file system containing target and other
    directories (side effect of the sync failure).
  • The new-module-name folder is treated as an unlinked plain folder rather than a Java module.

Expected Behavior:

  • The Java Project Manager should detect the folder rename operation.
  • The project metadata should be updated or re-indexed to reflect the name change, maintaining synchronization with
    the file system.

Additional Context:
Running the command "Java: Clean Workspace Cache" and restarting the language server resolves the issue and
correctly reflects the new folder name. This confirms that the Language Server's cache retains stale file paths and
fails to monitor file system rename events, causing the desynchronization and subsequent side effects.

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

Riproduci la ridenominazione dopo l'importazione di un progetto Java, quindi inizia con il comportamento del comando Java: Clean Workspace Cache e della sincronizzazione del server del linguaggio descritto nel report. Il lavoro è completato quando Java Project Manager riflette il nuovo nome della cartella senza ricreare la cartella precedente e la cartella rinominata rimane collegata come modulo Java.

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

Valutazione

Stack tecnologico
java, vscode
Ambito
developer-experience, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.