Configuring PhpStorm for Yii: ignoring directories

I’m trying to setup PhpStorm properly to use Yii. Instruction from the wiki says, “Mark framework/cli/views, protected/runtime and assets as excluded”. However, when I go to File > Settings > Project settings > Directories, only my project directories are there, directories of Yii aren’t. I’ve tried adding Yii directory as content root, but then not only Yii disappears from “External libraries”, but the rest of libraries from the same parent folder (smarty, bbcode etc.; pear remains). Ignoring using “mark as plain text” wouldn’t work too, because there’s no way to mark whole directories.

My directory structure:


D:\Web\                      

  ~app1\                     - resource root

    assets\                  - excluded from project

    protected\

      config\

      controllers\

      runtime\               - excluded from project

      ...

    index.php

    ...

  ~app2\

    ...

  libs\                      - in php include_path, listed as library home in external libs

    yii\

      demos\                 - should be excluded too?

      framework\

        base\

        cli\

          commands\

          views\             - how to exclude?

          ...

        ...

      requirements\          - should be excluded too?

      ...

    smarty\

    bbcode\

    ...

C:\Program Files\PHP\

  cfg\

  pear\                      - in php include_path, listed as library home in external libs

    phpunit\

    xml\

    ...

  php.ini

  php.exe

  ...

So, the questions are:[list=1]

[*]How to exclude “framework/cli/views” from analysis?

[*]Should “yii\demos”, “yii\requirements” be excluded too? Or should I move them to another dir? The problem is, these aren’t the only dirs I want to ignore inside external libs, other libs include samples and things like that which I’d like to see, but not analysed for code completion. (Excluding these dirs altogether would be okay too, but I don’t know how excude dirs inside “External libraries”.)

[/list]

Right click only the directories lists in the wiki, you can right click them and mouse over "Mark Directory As" -> "Excluded"

Or you can do it in File -> Settings then go to directories under Project Settings.

yiilite.php is the only file you should have to mark as plain text.

Any other directories you exclude are upto you but you don’t really need to.

Mark Directory As > Excluded command is only available for directories under project content root(s). When I click a dir inside “Exteral libraries”, there’s no command like this.

2161

phpstorm_no_exclude_dir.png

Had a look through the bugfix requests for phpstorm, aparently cant be done at the moment as you can select the external driectories to include per project. It’s inconvenient but perhaps you could only include the external yii directories needed for autocompletion etc.