IntelliJ IDEA 11.1 Web Help

10.5+

IntelliJ IDEA supports integration with the Phing build framework. Phing is mainly intended for building PHP projects, but it can be also used as a build tool in a number of areas. Phing functionality in IntelliJ IDEA is provided through a dedicated Phing Build tool window.

In this section:

Warning

Using the integration requires that you have downloaded and set up Phing on your computer. If you are using an AMP, the package may already contain Phing.

To enable Phing integration support

At the IntelliJ IDEA level, Phing integration is supported via the Phing bundled plugin. The plugin is by default enabled. If not, enable it in the Plugin Configuration Wizard or the Plugins page of the Settings dialog box.

  1. Open an Phing build file in the editor or select it in the Project tool window.

    Tip

    A correct Phing build file is an xml file with the root element <project>.

  2. On the context menu of the editor or the selection, choose Add as Phing build file.
  3. In the Phing Build tool window, that opens, click the Properties button properties on the toolbar.

    Note

    The button is only available if the list of build files is not empty.

  4. In the Phing Properties dialog box, that opens, specify the location of the phing.bat file.

After that the Phing Build tool window is available from the View | Tool Windows | Phing Build menu within the scope of the current project.

To open the Phing build tool window, do one of the following
  • If Phing support is not enabled in the project, 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..
  • If Phing is supported at the project level, choose View | Tool Windows | Phing Build on the main menu.
To configure a list of build files, perform these general steps
  • Open the Phing Build tool window.
  • To add a build file to the list, click the Add button add on the toolbar and choose the required .xml build file in the Select Phing Build File dialog box, that opens.

    Note

    1. Build files are created outside the Phing Build tool window. Find more about writing Phing build files in Getting Started.
    2. Normally, Phing build files are stored under your PHP project root folder.
  • To remove a build file from the list, select the file and click the Remove button delete on the toolbar.
  • To navigate to the source code of a build file, select the desired file and choose Jump to Source on the context menu of the selection.
To examine build targets
  • Open the Phing Build tool window.
  • To view the build targets defined in a specific build file, expand the corresponding build file node.
  • To have build targets defined in all build files displayed or hidden, click the Expand All expandAll.png or Collapse All collapseAll toolbar buttons respectively.
  • 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.
To run a build file
  1. Open the Phing Build tool window.
  2. Select the required build file in the list and click the Run button run on the toolbar or choose Run Build on the context menu of the selection.
To run a build target
  1. Open the Phing Build tool window.
  2. Select the required build target in the list and click the Run button run on the toolbar or choose Run Target on the context menu of the selection.
To have a target always executed before running or debugging the project according to a specific configuration
  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.

See Also

Procedures:

Reference:

Web Resources: