redhat-developer / redhat-developer/vscode-java

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

Ouverte
#4,294 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
TypeScript
Étoiles
2.3k
Forks
546
Merge moyen
20 h 1 min
PR mergées (30 j)
11

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Reproduisez le renommage après l’importation d’un projet Java, puis commencez par le comportement de la commande Java: Clean Workspace Cache et de la synchronisation du serveur de langage décrit dans le rapport. C’est terminé lorsque Java Project Manager reflète le nouveau nom du dossier sans recréer l’ancien dossier, et que le dossier renommé reste lié en tant que module Java.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java, vscode
Domaine
developer-experience, tooling
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.