Intellij IDEA Project view doesn't show structure as it did before.

My directory structure in the Project seems to have disappeared. The first picture is the "bad". I recently upgraded to 12.1 and the vim emulator at about the same time. I don't know if I missed a dialog that reset something? I can't figure out how to get it back like the second picture.
I've tried to re-import the project but it has not helped. I keep the project on Dropbox and have another PC where I have not reloaded project. Is there a way to get my view from that machine?

Bad

The picture is the "good" and how I want it to look.
Good


Solution 1:

I've come across this problem a few times myself. What happened is that intellij lost the module in my project settings. Here's my steps to fix it:

File -> Project Structure -> Click on modules (notice empty list) -> Click on '+' -> Click on import module -> Find existing myProj.iml

Solution 2:

I also have quite a few IntelliJ projects and also git folders of text files. I found IntelliJ does not always reconstruct the .idea files correctly. However the following methods work for me.

  • Open IntelliJ in the top folder where there is no .idea folder. Often IntelliJ will just construct a new .idea folder and works.
  • Copy an .idea folder from a similar project and modify to fit. The xml files in the .idea are reasonable to modify.
  • Solution 3:

    Open IntelliJ in the root project level works for me.

    I have a mixed project folder tree like the following:

    git_root
    - proj_android
    - proj_ios
    - proj_react
      - lib
      - src
    

    My problem is that when I open IntelliJ on my proj_react folder, I could not see my src folder or lib folder. (My proj_react is one level down from my git_root.)

    Then I open IntelliJ on git_root, I could see everything. The problem is solved.

    Solution 4:

    If you are working on a software development project where you are using Maven, Gradle, Flash Builder etc., the below mentioned steps should restore the project structure:

    1. Ctrl+Alt+Shift+S (or) File>>Project Structure
    2. Select 'Modules' in 'Project Settings'
    3. Alt+Insert (or) Select '+' to add a new module
    4. Select 'Import Module'
    5. Select the folder you want to import the module from(Generally the parent folder)
    6. Select 'Import module from external model' and the corresponding external model

    This resets your project structure.

    Solution 5:

    You can sometimes rescue projects like these by going and resetting their content root in the module settings. Or even recreate the module as another answer suggests.

    This is something that would happen to me if I opened an IntelliJ project in PhPStorm, then tried to open it in IntelliJ again.

    However as was mentioned the project format changed recently, so you should use the same version of intelliJ to work on your project.