Description
I am facing an issue with the Red Hat Java extension where the JAVA PROJECTS view shows duplicate/inconsistent project entries when multiple Java projects from different filesystem locations are opened in the same workspace.
Steps to reproduce
- Open VS Code.
- Create/open a workspace.
- Add two Java projects from different locations.
- Make sure both projects are valid Maven/Java projects.
- Open the JAVA PROJECTS view.
- Observe the project tree.
For example:
Workspace
├── D:\workspace\project1
└── D:\another-location\project2
When the projects are opened together, the Java Projects tree can show duplicate project entries or an incorrect hierarchy.
Example:
JAVA PROJECTS
├── timestamp
│ └── timestamp
└── timestamp
Expected behavior
Each Java project should appear only once and should be associated with its correct project/workspace location.
Actual behavior
The same Java project can appear multiple times in the JAVA PROJECTS tree, and the hierarchy can become inconsistent.
The issue is especially noticeable when the projects are located in different filesystem locations. When projects are located under the same location, I do not observe the issue.
Additional information
I initially observed this issue in an Eclipse Theia-based editor using the Red Hat Java extension. I then reproduced the same behavior in standard VS Code as well.
Therefore, the issue does not appear to be specific to my Theia implementation.
I also observed related errors while opening files/projects, including:
TextEditor(vs.editor.ICodeEditor:8,$model11) has been disposed
and:
Widget was activated, but did not accept focus after 2000ms:
code-editor-opener:file:///...
Could you please investigate whether this is related to Java project identification/project URI handling or the Java Projects TreeDataProvider when multiple workspace folders/projects are present?
I can provide extension logs, JDT LS logs, workspace configuration, and a minimal reproduction project if required.

Description
I am facing an issue with the Red Hat Java extension where the JAVA PROJECTS view shows duplicate/inconsistent project entries when multiple Java projects from different filesystem locations are opened in the same workspace.
Steps to reproduce
For example:
When the projects are opened together, the Java Projects tree can show duplicate project entries or an incorrect hierarchy.
Example:
Expected behavior
Each Java project should appear only once and should be associated with its correct project/workspace location.
Actual behavior
The same Java project can appear multiple times in the JAVA PROJECTS tree, and the hierarchy can become inconsistent.
The issue is especially noticeable when the projects are located in different filesystem locations. When projects are located under the same location, I do not observe the issue.
Additional information
I initially observed this issue in an Eclipse Theia-based editor using the Red Hat Java extension. I then reproduced the same behavior in standard VS Code as well.
Therefore, the issue does not appear to be specific to my Theia implementation.
I also observed related errors while opening files/projects, including:
and:
Could you please investigate whether this is related to Java project identification/project URI handling or the Java Projects TreeDataProvider when multiple workspace folders/projects are present?
I can provide extension logs, JDT LS logs, workspace configuration, and a minimal reproduction project if required.