microsoft / vscode-java-dependency

Manage Java projects in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-dependency
MIT License
152 stars 74 forks source link

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

Open testforstephen opened 1 year ago

testforstephen commented 1 year ago

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

jdneo commented 1 year ago

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:

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.

rossinineto commented 1 year ago

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.

jdneo commented 1 year ago

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