Project view not showing directories

Somehow the Project view is not showing the directories for my Project?  It's as though it's treating the build.xml as the 'root' of the project and I'm not able to browse directories as I usually can.  I've tried invalidating the caches and restarting, no help.  Problem is not present for any of my other projects.



Attachment(s):
Screen shot 2011-12-20 at 11.22.52.png
8
43 comments
Avatar
Permanently deleted user

Further to this, the Project preferences for Directories won't load to show which directory the project points to.  See attached.



Attachment(s):
Screen shot 2011-12-20 at 11.40.01 (2).png
2

Check your idea.log -- it may have some details explaining why or what is happening (Help | Reveal log in Explorer). Possibly one of the config files got corrupted.

You can always backup and delete .idea subfolder (project settings) and re-create project from scratch. When it's wroking again (after basic configuration) you may copy some of the files from that folder back to recover some of your settings (if there were many).

11
Avatar
Permanently deleted user

Thanks, I didn't have to many settings, and deleting .idea then recreating the project has solved the problem.

8
Avatar
Permanently deleted user

Though, sorry, I didn't check the log before I deleted it... :( If it happens again I will do and report back findings if that would help.

0
Avatar
Permanently deleted user

Thanks, deleting the .idea directory worked for me. After that all the folder showed up again.

2

Is that it? No way to force reindex the project folder ... so every time I add a new folder I have to close the project, delete .idea then open the project again ??

1

@Leo

No idea. That delete option was offered as hard workaround for one time issue.

If it happens to you all the time.. then it must be something else and needs investigation. Contact Support Team by making Support Request -- use "Submit a Request" link at the top of this page.

2
Avatar
Permanently deleted user

Thanks, deleting the .idea directory worked for me too.

1
Avatar
Permanently deleted user

Switch to "Project Files" view instead of "Project" view. Done.!!!

14
Avatar
Permanently deleted user

Switch to "Project Files" view instead of "Project" view

Worked for this newb

6

To view all folders in explorer project view...
File -> Settings

Version Control -> Directories

Add content root to project root folder. All folders will appear in project

2
Avatar
Permanently deleted user

Issue still persists in PHPStorm 2020.2.

No directories found, Settings > Directories is empty ("nothing to show").

Deleting the .idea/workspace.xml file did the job for me. The re-created workspace.xml did not show any significant differences - however, re-creating the file also created a .idea/<project>.iml file which was missing before. So I suppose that's might be the core of the problem. Also, the inspectionProfiles folder was created after that, but I suppose that is just because previously my source folders were not available for indexing.

2
Avatar
Permanently deleted user

I think I found a simple solution that seems to work for me in PHPStorm. Yes, you can switch to the "Project Files" view, but that does not solve the problem of namespaces not being properly detected and "class not found" inspections in the IDE.  I tried invalidating the cache and restarting but that did not seem to help. I did not want to delete the .idea directory. On a whim, I tried closing the project via the "File-->Close Project" menu and re-opening it. This worked for me after all other methods failed. I didn't even have to restart the IDE. So, apparently manually closing and re-opening the project without restarting the IDE does something different than simply closing the window and restarting the IDE. 

29

You're definitely right, Brett. Thank you!)

1

If you still facing this issue, check that your path to the project doesn't contain special characters. Because in my case, there was a folder "\...more!\" and in Settings>Directories content root was "\...more\!\". 

0
Avatar
Permanently deleted user

Banehallow unless spaces are considered special characters, this cannot be the reason in my case.

@... got it right, that's the most simple workaround. However, this is only a workaround and still a bug that should be addressed.

0
Avatar
Permanently deleted user

@..., thank you! Your simple solution helped me! For me - the same issue appears in my IntelliJ IDEA Ultimate 2020.3.

2

@... you're lifesaver, man!

0

@... is a genius. Saved me so much time, thank you.

0

@... thanks

4 Idea team -> you should optimaze open dialog it is very often unstable part of IDE, it is very anoyng sometimes work, but after few update some problems occurs

0
Avatar
Permanently deleted user

@...'s solution worked for me as well! Thank you.

1

I had this issue with two projects. Neither Oliver's nor Brett's solution didn't work in my case. Invalidating the caches and restarting did not work, either. Deleting the `.idea` directory fixed the issue on the first project, but found a simpler solution with the second one:

  • Update the paths in `idea/modules.xml`

 

 

1

So, I see what is gong wrong, and I now have a good understanding why. The problem is that the .idea folder is best not committed to git/version-control as it differs per developer/system. My tip to all is to ignore the folder, but more importantly untrack the folder as well. Switching to branches which still have this folder tracked, can bring problems as you will be switching .idea folder to other developers and older states (losing for example run configurations).

(I think my problem still arises for because my master branch still contains the .idea folder, so I have to release/PR to master to untrack it and it will be fixed.)

How to fix it:
1) Add .idea or **/.idea to .gitignore

**/.idea
... other ignores


2) And untrack the folder (adjust the path to your situation). Make sure to commit/push and PR/merge/release the result to any afflicted branches.

git rm -r --cached .idea
4

@D J Zwart

You can share the .idea in VCS if that makes sense/brings benefits for your team. Just not the whole folder: some dev-specific files need to be excluded. Check the link below for some general info:

https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

2

What worked for me is that I closed the project from the "File" menu, then delete the .idea/ folder from command line and then open the project again.

13

Vireyes14

Thank you, that worked for me unlike other solutions

1

The issue still persists for me using WebStorm.

Here's a list of proposed solutions from this thread that don't work for me:

  • Doing a "File > Close Project" and "Open Recent"
  • Quit and Restart doesn't work
  • Tell git to ignore the .idea/ folder (it's not tracked in the project)

The only thing that works is to delete the .idea/ folder and start fresh.

WebStorm 2021.1.2
Build #WS-211.7442.26, built on May 24, 2021
Runtime version: 11.0.11+9-b1341.57 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7

3

Thanks, deleting the .idea directory worked for me too.

0

Please sign in to leave a comment.