vscode-java-dependency icon indicating copy to clipboard operation
vscode-java-dependency copied to clipboard

Cannot expand the resources under non-java root in multi-root workspace

Open testforstephen opened this issue 2 years ago • 3 comments

When I open a multi-root workspace with two roots like "java-debug" and "vscode-java-debug", the root "java-debug" with java projects is displayed well, but the non-java root "vscode-java-debug" only shows a fake node, and cannot expand its resources. This forces me to use the File Explorer instead of the Project Explorer when working with multi-root workspaces. This is an issue that we need to resolve if we want the Java Projects view to have all the functionalities of the File Explorer.

image

testforstephen avatar Apr 24 '23 08:04 testforstephen

The root cause is that no IProject found under the root vscode-java-debug. Because of that, the resource workspace tree at the server side does not have element under that folder.

To fully support such case, one possible solution might be:

  • Client side first get the FS hierarchy.
    • If any folder/file has a corresponding Java Model at server side, render it with Java element style.
    • Otherwise, render it as a normal file/folder.

By doing this, we can have an explorer more like the current the File explorer, but with special Java nodes inside it. (The one similar to the IDEA's style)

But that requires a huge amount of refactoring work, so I would like to wait to see if enough users will be interested in this.

jdneo avatar Apr 24 '23 08:04 jdneo

I´m experiencing same problem after update to 0.22 version. Children maven projects from a father maven project didn´t not appear source folders and classes anymore. It was necessary to downgrade to 0.21.2.

rossinineto avatar Apr 28 '23 05:04 rossinineto

@rossinineto How does your project structure look like? I think you can just turn the setting java.project.explorer.showNonJavaResources to false without downgrade.

jdneo avatar Apr 28 '23 09:04 jdneo