intellij - Flatten packages in project view not working.
Answered
I have been using eclipse for last 10 years, now I have made an attempt to move to intellij, one of the view I always use on eclipse is Flat Package view. I know intellij support Flatten packages view but I can get it working.
I have tried all solutions suggested in forums, but cannot get flatten packages working.

intellij version

I am importing a existing eclipse gradle project as a module in empty project, which will enable me to import multiple projects as modules in single project.
Please sign in to leave a comment.
Hi.
You need to mark src folder as source content root (https://www.jetbrains.com/help/idea/content-roots.html). If you have a Gradle project you need to do it via build.gradle.
Hi,
I could get flatten packages working by setting src folder as source content root. But it leads me to another problem, moment I do that all the other folder go missing ex. gradle, docker etc. from project view.
As I see src folder is set as separate module, java folder is a content root:
https://www.jetbrains.com/help/idea/creating-and-managing-modules.html
Finally I could get it working. Thank you :-)