redhat-developer / redhat-developer/vscode-java
Renaming module folders is not synchronized with the Java Project Manager and may result in renaming ghost folders
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 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:
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the rename after Java project import, then start with the Java: Clean Workspace Cache command and language-server synchronization behavior described in the report. Done means the Java Project Manager reflects the new folder name without recreating the old folder, and the renamed folder remains linked as a Java module.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100