microsoft / vscode-java-dependency

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

Error: Cannot resolve tree item for element #832

Open andersmmg opened 2 months ago

andersmmg commented 2 months ago

I get this error often when I change or sometimes even view non-java files in my project. It makes all those resources disappear from the project and they will be unavailable when running it. I have to reload java and gradle and it usually fixes it but takes a while and it happens pretty often lately.

2024-04-28 18:26:15.812 [error] Error: Cannot resolve tree item for element 0/0:[redacted]/0:src//main/resources/0:assets/0:[redacted]/0:blockstates from extension vscjava.vscode-java-dependency
    at /usr/lib/code/out/vs/workbench/api/node/extensionHostProcess.js:154:43373
jdneo commented 2 months ago

Hi @andersmmg, would you mind providing reproduce steps for this issue?

It makes all those resources disappear

Do you mean the tree items in the Java Project explorer disappear?

andersmmg commented 2 months ago

I mean some of the items in the project explorer disappear, and aren't included when I debug the code either. I have to manually try to get gradle and VSCode's to refresh the project to get them to appear again, but they go away after editing them externally or sometimes it just seems random. For now I've just switched to using IntelliJ IDEA and it works perfectly fine on the same project, which is why I figure it's an issue on VSCode's side.