Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 871
Jani Hartikainen Avatar asked Oct 15 '22 00:10

Jani Hartikainen


People also ask

Where is the directory in IntelliJ?

If you installed IntelliJ IDEA via the Toolbox App, the plugins directory will be located in the installation directory. To find the installation directory, open the settings of the IDE instance in the Toolbox App, expand Configuration and look for the Install location field.

How do I change project Structure view in IntelliJ?

To change settings of a module that hosts the file you are currently editing, just press Alt+F1, 7 or open the View menu, select Select In and click Project Structure. IntelliJ IDEA will open the Project Structure dialog and jump to the required module.

Why project Structure is not showing in IntelliJ?

Restart IntelliJ. Verified that the project root folder now appeared (in Project Settings > Modules) Toggle On the toolbar buttons (i.e. 1. Project Structure) to display on the left sidebar (clicked View > Toolbar Buttons until tick appears)


2 Answers

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.

like image 110
Jani Hartikainen Avatar answered Oct 22 '22 20:10

Jani Hartikainen


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.

like image 83
Travis Schneeberger Avatar answered Oct 22 '22 21:10

Travis Schneeberger