How do I get IntelliJ IDEA to display directories?

I've been struggling with this same problem and found another reason why directories may not show up correctly. Make sure the "Content Root" is correct.

  • Click on the project
  • Select "File"->"Project Structure"
  • Select "modules" from the left column, and select a module.

On the sources tab you will see the current "Content Root" along with a button to add a new content root.

Make sure that content root is correct. When in the project structure view you will only see files below the "Content Root". I'm fairly new to IntelliJ but I think of the content root as the basedir in ant terms.

These instructions are for IntelliJ 9.x

Hope this helps someone.


Current more straightforward logic:

  • remove the .idea/ folder
  • select in Idea File -> New project.
  • in left menu select Web Module, and then set up project folder
  • you're done!

It appears I need to manually create a Java module (File->New Module) inside the project to actually see the "proper" directory view. I do wonder why it didn't show up when I created it with the project.