redhat-developer / redhat-developer/vscode-java
Renaming module folders is not synchronized with the Java Project Manager and may result in renaming ghost folders
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.3k
- Forks
- 546
- Merge medio
- 20 h 1 min
- PR fusionados (30 d)
- 11
Descripción
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:
- Open a workspace folder that contains multiple Java sub-projects (modules).
- Wait for the Java Language Server to finish importing and indexing all projects.
- 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. - 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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Reproduce el cambio de nombre después de importar un proyecto Java y, a continuación, comienza con el comportamiento del comando Java: Clean Workspace Cache y de la sincronización del servidor de lenguaje descrito en el informe. Se considera terminado cuando Java Project Manager refleja el nuevo nombre de la carpeta sin volver a crear la carpeta antigua, y la carpeta renombrada sigue vinculada como módulo Java.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, vscode
- Área
- developer-experience, tooling
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100