marhg
marhg

Reputation: 687

intellij subfolders structure

This topic/issue is easy, but so far I haven´t found the right way to make it work and that takes me a lot of time, dealing with the creation of subfolders.

Let´s take this example

I created a folder under resources called META-INFO:

enter image description here

When I create a subfolder I would like to have this structure

resources
 -META-INFO
  -newfolder

But this is what in reality happens

enter image description here

This also often happens in my main folder, when creating packages Instead of having this:

com.myproject.demo
  -model

Does this

com.myproject.demo.model

Is there a missing configuration? I looked at similar topics, but I couldn´t find the solution. As well I looked at videos, but no success.

Any suggestions?

Upvotes: 2

Views: 1705

Answers (4)

Mr.GoLangThang
Mr.GoLangThang

Reputation: 1

Un-tick this one

In my case, I just un-tick Flatten Packages.

Upvotes: 0

Mr.GoLangThang
Mr.GoLangThang

Reputation: 1

Frist of all, I click thi the three vertical dots icon.

Then I Click to Flatten Packages.

setting-packges-view

Upvotes: 0

Towhidul Haque Roni
Towhidul Haque Roni

Reputation: 115

just uncheck the option "Hide Empty Middle Package" from the project drop down menu (wheel like drop down menu on the top)

Upvotes: 1

trappski
trappski

Reputation: 1061

The folder is treated as part of a package thus the .-notation.

If you disable the option "Flatten packages" you will get the tree structure to show instead. However the directory structure is still proper. Also you can switch to "Project Files"-view rather than "Project" to see it as directories.

This should be the relevant documentation as well: https://www.jetbrains.com/help/idea/project-tool-window.html

Upvotes: 1

Related Questions