Intellij splits one folder into many other

Answered

Hello!

I've done some great damage to your great IDE (jk, it just annoys me). For some reason lately Intellij randomly decides to create a separate path for each folder I add. It appears to be caused by something, as it does that for mostly generated/cloned resources into the project.

Marking dir as excluded fixes it, although that disrupts my Fengshui. Here is it how it looks:

 

Have anyone faced such an issue?

0
7 comments
Avatar
Yaroslav Bedrov

Hello,

Seems it's a sources root folder with packages. If package isn't empty then it's shown as a separate item in tree.

0

Hello!

Sorry for the late answer, but I kind of wanted to play with it and maybe fix it on my own although I did not find a solution. One hunch, I got was to double check package and folder (as obvious as it is), but it did not help. Moving folder around as well was not very... effective? I guess this is more java like question, but I am heavily confused by the fact it compiles without warning, nor any other problem.

 

Can I somehow address it? Or marking it as 'excluded' is the only way?

BR
Ormaniec

0
Avatar
Yaroslav Bedrov

Ormaniec,

Is it possible to share sample project example for investigation?

0

Hello!

Yes ofcourse, here it is: https://gitlab.com/hubris-team, and here is java repo https://gitlab.com/hubris-team/hubris-receiver (it requires both repos, and unfortunatly is platform dependant as for now).


Although I noticed one major thing. I am writing this answer on different machine, and when I turned on the intellij, It did not split the folders, and worked like a dream! Might it be some kind of setting inside idea?

Generated files:

 

Generation sources:


BR,
Ormaniec

0
Avatar
Yaroslav Bedrov

Ormaniec,

Please check that "Flatten Packages" option is disabled under cog wheel in Project Tree.

2

Hello!

Oh, my. I feel stupid now. But what is the advantage of such a view?

and thank you for solving my problem Yaroslav!


0
Avatar
Yaroslav Bedrov

With such view you have all packages on one level and you don't need to drill down several levels to find needed class.

0

Please sign in to leave a comment.