Automatic collapsing of expanded folders in IntelliJ IDEA with auto navigation from source to project tree

889 Views Asked by At

I have set automatic navigation from selected source file to the tree file view in project explorer. That works perfectly :) (see this for how to)

Now, after I open several files scattered in different locations of project file tree, this auto-navigation results in much too many expanded file locations. This is because every time I click a file, IntelliJ navigates me to see where the file is located, but when I click another, the previous expanded tree does not collapse. The situation becomes 'blind' and I am forced to close auto expanded locations manually.

I need IntelliJ to collapse those trees, that were automatically expanded, but leave those, that I have open manually.

In this manner I have found this thread, but its not exactly what I suggest.

Presumably, this is too fine feature and I did not see it in other IDEs. However, I believe it could help developers, especially in case of rather large projects, they are trying to dive in with little knowledge.

0

There are 0 best solutions below