IntelliJ IDEA 2017.2 Help

Managing Phing Build Targets

This feature is supported in the Ultimate edition only.

The following is only valid when PHP Plugin is installed and enabled!

Phing functionality in IntelliJ IDEA is provided through a dedicated Phing Build tool window.

In this section:

Accessing Phing Buide tool window

  1. Open a Phing build file in the editor or select it in the Project tool window, and then choose Add as Phing build file on the context menu of the selection.
  2. Choose View | Tool Windows | Phing Build on the main menu. The tool window can be accessed after you have opened it through the context menu of a Phing build file in the editor or in the Project tool window.

Examining the build targets defined in a build file

  1. Open the Phing Build tool window. The window shows all the build files as nodes.
  2. Depending on your goal, do one of the following:
    • To view the build targets defined in a specific build file, expand the corresponding node by clicking plus_expand.png next to the build file name. Note that this expanding does not affect the targets marked as hidden.
    • To fold or unfold the build targets defined in all build files, click respectively the Expand All button expandAll.png or the Collapse All button collapseAll.png on the toolbar. Note that unfolding does not affect the targets marked as hidden.
    • To navigate to the definition of a target in the source code, select the desired target and choose Jump to Source on the context menu of the selection.

Hiding targets

Among the targets defined in a build file, you may have some that are only called by other targets and are never run alone. You can suppress showing such targets in the build file tree by marking them as hidden.

Hidden targets do not become visible when you expand the node of a specific build file or click Expand All button expandAll.png.

You can mark a target as hidden both directly from the Phing Build tool window or from the Phing Settings dialog box. However, the hidden status can be removed only through the Phing Settings dialog box.

Depending on your goal, do one of the following:

  • To mark one or several build targets as hidden, do one of the following:
    • In the Phing Build tool window, select the targets under their build file node and choose Mark to Hide on the context menu of the selection.
    • Select the build file in which they are defined and click the Settings button properties.gif on the toolbar. Then in the Phing Settings dialog box that opens, switch to the Hiding targets tab and select the Hide check boxes next to the targets to be hidden.
  • To remove the hidden status of a target:
    1. Select the build file in which it is defined and click the Settings button properties.gif on the toolbar.
    2. In the Phing Settings dialog box that opens, switch to the Hiding targets tab where the Hide check boxes next to the names of the hidden targets are selected. Clear the Hide check boxes next to the targets for which you want the status hidden removed.

Associating a shortcut with a Phing target

You can associate a build target with a keyboard shortcut and execute commonly-used targets with a single key-stroke. If a Phing build file is added to the project, its targets appear under the Phing Targets node in the Keymap dialog box.

  1. In the Phing Build tool window, right-click the desired build target.
  2. On the context menu, choose Assign Shortcut.
  3. In the Keymap dialog box that opens, configure the shortcut as described in Configuring Keyboard Shortcuts.

Appointing targets for execution before running or debugging

  1. Open the Phing Build tool window.
  2. Select the desired target and choose Before Run/Debug on the context menu of the selection.
  3. In the Execute Target Before Run/Debug dialog box that opens, select the configurations before which you want the target executed.
Last modified: 29 November 2017

See Also

Procedures: