Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ - how to teach the project tree not to "shortcut" single subfolders

A minor issue, and really bad search term for google...

If you create a folder in the SRC folder (= package), and you create a class in it, all is fine. If you create a folder beside the class afterwards, still all is fine.

If you create a folder in the SRC folder, and then a folder in it, IntelliJ "concatenates" the path, and you cant reach the folder to create a class next to it. - wow, no way to understand this without an example :-)

Create Folder A
Create Folder A.A
Create Class A.A.c
Create Folder A.A.B

All fine, no problem to navigate...
But now try this:

Create Folder A
Create Folder A.A
Create Folder A.A.B
Create Class A.A.c

The last point is not that easy, there is no way to reach A.A in the tree anymore, the only clickable option is A.A.B (to e.g. create a class in it, which would be A.A.B.c)

I know, writing this possible took longer then just selecting "show in explorer" and creating the folder manually, but still, I am sure there is a switch for it :-)

like image 504
Christian Ruppert Avatar asked Dec 02 '11 20:12

Christian Ruppert


1 Answers

In the project pane, click the gear in the top right corner, and un-select "compact empty middle packages".

like image 200
Mark Bolusmjak Avatar answered Sep 25 '22 21:09

Mark Bolusmjak