views:

401

answers:

4

I've been trying out IntelliJ IDEA for JavaScript editing and I'm liking 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 dir 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?

IDEA version 8.1.3, the code is just a plain bunch of HTML and JS files not in any kind of a Java environment.

A: 

I'm mystified. I've been using IntelliJ for five years, and I've always been able to see directories under my project folder. The only ones that I don't see in that view are under output.

First question: Which version of IntelliJ?

What kind of facet did you create? Is your JavaScript in a web facet?

There shouldn't be any need to front IntelliJ with Eclipse. There's something else going on, but more information is needed to fix it.

duffymo
8.1.3, just an index.html file and a bunch of dirs with css, js etc. in them, no Java stuff involved. Created it as a Java project, it does not really give any other options.
Jani Hartikainen
Sounds like a web facet to me. I've got a project right now that has folders without any Java stuff, and I can see them. I don't get it.
duffymo
+1  A: 

in the project explorer window (where all the classes are) switch from "packages" view to "project" view. then all files, not just classes are displayed

Andreas Petersson
Thanks but that doesn't seem to be the problem. They don't show up in the project view either
Jani Hartikainen
+2  A: 

Okay, 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.

Thanks for your time guys/gals

Jani Hartikainen
WONDERFUL! Thanks.
arik-so
A: 

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.

Travis