Early Access Program Features Releases

Improved Structure View in PhpStorm 9

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:

// 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

image description