PhpStorm 8.0.0 Web Help

File | Settings | Project Settings | Language Injection

settings

Use this page to manage the list of available language injections and configure the language injection feature for text, attributes, and parameters. The page appears in the Settings dialog, when IntelliLang plugin is enabled.

In this section:

Prerequisites

Note

Before you start working with language injections, make sure that IntelliLang plugin is enabled.

The plugin is bundled with PhpStorm and activated by default. If not, enable the plugin as described in Enabling and Disabling Plugins.

Injection entries

This table shows all injections currently available in PhpStorm.

Item Description
Enabled status To enable or disable an injection, select or clear the check box.

You can also enable or disable a number of injections at once. To do that, select the required injections in the list and click Enable Selected Injections svnSelectAll.png or Disable Selected Injections iconUnSelectAllRemoteRunDialog.gif on the toolbar.

Display Name This read-only column shows the names of the injections and the libraries that implement them.
Language This read-only column shows the languages of injections.
Type PhpStorm distinguished between the following types of injections:
  • bundled
  • global
  • project

The bundled type is for the pre-defined injections. When a new injection is added, it gets global type by default. The injection type can be toggled to project by clicking icon_injection_move_to_project_make_global.png.

Use the toolbar buttons to manage the contents of the table.

Toolbar

Item Tooltip and Shortcut Description
add.png Add
Insert
Click this button to create a new entry. From the pop-up list that opens select the new entry type:
  • XML Attribute Injection
  • XML Tag Injection

Configure the entry in the Language Injection Settings dialog that opens.

delete.png Remove
Delete
Click this button to have the selected entry removed from the list.
copy.gif Duplicate Click this button to have PhpStorm create a copy of the selected injection entry. By re-configuring this copy you can create a new injection based on the existing one.
properties.gif Edit
Enter
Click this button to re-configure the selected entry in the Language Injection Settings dialog box that opens.
svnSelectAll.png Enable Selected Injections Click this button to enable the injections that are currently selected in the list.
iconUnSelectAllRemoteRunDialog.gif Disable Selected Injections Click this button to disable the injections that are currently selected in the list.
icon_injection_move_to_project_make_global.png Move to Project/
Make Global
Shift+Space
Use this button to toggle between the project and global states of the selected injection configurations.
  • Character strings configured as project injections are treated as source code only within the current project.
  • Character strings configured as global injections are treated as source code at the PhpStorm level, that is, within any PhpStorm project.
iconImport.png Import Click this button to have an injection configuration from another PhpStorm installation imported. The Select Path dialog opens, where you can select the IntelliLang.xml file from the desired location. The dialog box that opens displays the entries contained in the configuration file. Remove the unnecessary entries from the list using the Delete button.

Note

This will not affect the contents of the configuration file.

Tip

This selective import-feature makes it easy to share certain configurations in a team without losing any local entries as it happens when settings are imported via the core Importing Settings feature.

Warning

To prevent inconsistent data, import is only possible if the existing configuration has not been changed or has been saved using the Apply button.

exportToTextFile.png Export Click this button to have one or several selected injection configurations saved in a file. Upon clicking this button, the Export Selected Injections to File dialog box opens.
  • To have the configurations appended to an existing file, select the required file.
  • To have the configurations saved in a new file, specify the file name and choose the file type from the drop-down list.

See Also

Procedures:

Web Resources: