Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA folders instead of packages in project view

Is it possible in IntelliJ IDEA to show folders instead of packages in project view? There is such a feature in Eclipse: we can just switch from "package explorer" to "project explorer" and here we go.

To make it more clear:

I want to see packages as hierarchy of folders.

I wanna see this:
enter image description here

but instead I see this:

enter image description here

like image 895
mr.nothing Avatar asked May 02 '12 11:05

mr.nothing


People also ask

How do I change project structure view in IntelliJ?

To change settings of a module that hosts the file you are currently editing, just press Alt+F1, 7 or open the View menu, select Select In and click Project Structure. IntelliJ IDEA will open the Project Structure dialog and jump to the required module.

How do I get package view in IntelliJ?

Click on the gear icon at the top right on the package view, and make sure that "Flatten Packages" and "Compact empty middle packages" are unchecked. Show activity on this post. This screen shot taken from IntelliJ IDEA 2017. Most of the time the answer will be same on every Intellij IDE.

How do I mark a folder as a module in IntelliJ?

From the main menu, select File | Project Structure Ctrl+Alt+Shift+S and click Modules. Select the necessary module and open the Sources tab. to the right of the necessary folder (folder path). Specify the path relative to the output folder root, and click OK.

How do I change the default view in IntelliJ?

Back up your settings and restore the defaultsFrom the main menu, select File | Manage IDE Settings | Restore Default Settings. Alternatively, press Shift twice and type Restore default settings . Click Restore and Restart.


2 Answers

Yes you can switch "View as" from Packages to Project.

Packages

Project

For expanding folders uncheck Compact Empty Middle Packages

enter image description here

like image 123
chalimartines Avatar answered Sep 22 '22 13:09

chalimartines


Simple, follow these steps and you should able to resolve the issue

Step 1

Then

Step 2

Done :-)

like image 35
Karthik H Avatar answered Sep 21 '22 13:09

Karthik H