问题
I would like to know if anyone knows how to flatten the package structures in Visual Studio Code.
I used to have this in my IntelliJ IDE, but with VS Code I can't find a similar option. I am looking for any solution which could resolve this. Either changing settings or extensions if available.
回答1:
This is supported since the 1.41 release (November 2019) and enabled by default. VSCode calls this feature "compact folders", and it can be disabled like this:
"explorer.compactFolders": false
(gif from the release notes)
回答2:
For java the only way i found is using this extension (it won't change the default file explorer, but you can fold that one and use this one instead).
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-dependency
or goto your VSCode->Extensions and search for "Java Dependency Viewer".
来源:https://stackoverflow.com/questions/39591443/visual-studio-code-flatten-packages-in-explorer-view