Adding a file to a project that is outside the project directory

I have the following root structure

dir1
dir2
index_dir
dir3
...
index.php

      

I want to have a project in phpStorm (7.1.3) so I only see index_dir and index.php

the problem is that if I create a new project via "Open directory", I only have index_dir in my project. I would like to add the index.php file to this project and not any other directory. How should I do it. It drives me crazy.

+3


source to share


2 answers


You can always customize the include path to a lower level directory, but that won't work if the project is in your external library / include path directory (endless loop)

PhpStorm Add include path

The way you suggest just cannot be done

EDIT:



While you cannot hide these other directories, you can ignore them

PhpStorm Ignore directories

Ignored directories will not be indexed

EDIT 2017: In more recent versions of PHPStorm like v2017.1 and later, you can open multiple projects in one window, this is by far the best solution you will ever get.

+8


source


You can add a custom area to your shared PS project.

For example, I'm working on a Quicklinks app and I only need a subset of the files in my overall WordPress installation. I want to see files with a word quicklinks

in the filename or directory. For this, I configured the following area template in Settings | Appearance and Behavior | Areas of use

file:*quicklinks*/

This looks for any file or directory anywhere in my shared project that contains a string quicklinks

in its name.



Screenshot

In the OP's case, the scope with this pattern should work:

file:index*/

Beware that empty directories may not be included.

0


source







All Articles