How do I get IntelliJ IDEA to display directories?
I've been trying out IntelliJ IDEA for JavaScript editing, and I like it so far, but I'm having a small problem with a new project.
I can't seem to be able to get IDEA to display the directories in the project directory in the Project view. Even if I manually add a directory, it refuses to display it.
I think this probably has something to do with the fact that it tries to apply Java conventions, but when I imported an old Eclipse project, it showed all directories just fine.
Do I have to use Eclipse to create projects and import in IDEA to get the directories visible, or is there some other trick?
I am using IDEA version 8.1.3, and the code is just a plain bunch of HTML and JavaScript files, not in any kind of a Java environment.
Solution 1:
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.
Solution 2:
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.