Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm not showing project files in project view

Tags:

After I had installed PhpStorm and created a project from an existing source files, The project pane is not showing any file from the directory. So how can we solve the problem?

like image 503
Muhannad A.Alhariri Avatar asked Jan 02 '18 18:01

Muhannad A.Alhariri


People also ask

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)

How do I find a file in PhpStorm?

From the main menu, select Edit | Find | Find in Files Ctrl+Shift+F . In the search field, type your search string. Alternatively, in the editor, highlight the string you want to find and press Ctrl+Shift+F . PhpStorm places the highlighted string into the search field.

How do I open a project in PhpStorm?

Open a projectClick Open on the Welcome screen or select File | Open from the main menu. In the Select Path dialog, select the directory that contains the project to open.


2 Answers

In case both above solutions do not work, try this following approach:

  1. cd to your projects .idea Folder

  2. Check if there is a file called project_name.iml. If this is not the case create it and paste the following content to it

    <?xml version="1.0" encoding="UTF-8"?> <module type="WEB_MODULE" version="4">   <component name="NewModuleRootManager">     <content url="file://$MODULE_DIR$"></content>   </component> </module> 
  3. Then check if there is a file called modules.xml. If this is not the case create it and paste the following content to it (which targets to your previously created project_name.iml)

    <?xml version="1.0" encoding="UTF-8"?> <project version="4">   <component name="ProjectModuleManager">     <modules>       <module fileurl="file://$PROJECT_DIR$/.idea/project_name.iml" filepath="$PROJECT_DIR$/.idea/project_name.iml" />     </modules>   </component> </project> 
  4. Restart PhpStorm

like image 63
Mustafa Yousef Avatar answered Sep 28 '22 18:09

Mustafa Yousef


After investigation on the issue, I got the solution as follow:

  1. Remove .idea directory from your root project directory
  2. Invalidate and restart your IDE , FILE -> Invalidate cache /Restart -> then click on Invalidate cache and restart
  3. You are done :)

Here is the source

https://intellij-support.jetbrains.com/hc/en-us/community/posts/207066915-Project-view-not-showing-directories

like image 40
Muhannad A.Alhariri Avatar answered Sep 28 '22 18:09

Muhannad A.Alhariri