Improved Structure View in PhpStorm 9

Posted on by rustam.vishnyakov

PhpStorm 9 brings two new features to PHP structure view: custom regions and visibility filters for private and protected members. In this blog post we’ll show how those two work.

Custom Regions

Custom regions are an additional way to group items in PHP structure view. If these are added inside a file or a class, they are shown in the structure view too with the special customRegion icon.

For the following sample code:

<?php
// region Global Functions
function first() {}
function second() {}
// endregion

class MyClass {
// region Private Fields
private $x;
private $y;
// endregion

// region Public Methods
public function first() {}
public function second() {}
// endregion
}

…the structure view will look like this:

Screenshot from 2015-05-06 12:20:09As you can see, all the custom regions such as Global Functions, Private Fields and Public Methods are shown as grouping nodes for the items they surround. You can navigate from these nodes. For example, press F4 (jump to source) in the structure view with a custom region selected to display the beginning of the custom region in the editor.

More Visibility Filters

We’ve added filters for private and protected class members:
phpstorm_filters If both filters are disabled, only public members (fields and classes) will be shown.

Download the latest PhpStorm 9 EAP and try the new and improved structure view for PHP today!

Please share your thoughts, feature requests or issues you’ve encountered through the issue tracker, by posting in the comments below, or in our forums.

Develop with pleasure!
-JetBrains PhpStorm Team

Comments below can no longer be edited.

5 Responses to Improved Structure View in PhpStorm 9

  1. kamilsj says:

    May 29, 2015

    When are you going to release Phpstorm 9? I can’t wait to use a stable version 🙂

    • Mikhail.Vink says:

      May 29, 2015

      It’s planned to be released by the end of Q2 2015, so by the end of June.

      • look says:

        June 3, 2015

        I’m guessing that final version will lack of hacklang support. Am I right?

        • Mikhail.Vink says:

          June 10, 2015

          We’re not sure yet. We’re discussing the issue internally and will share more details soon.

  2. Andrei says:

    June 4, 2015

    Will the Structure view regions also work in CSS files?

Subscribe

Subscribe for updates