IntelliJ IDEA 2022.2 Help

Language Injection Settings dialog: Java Parameter

The dialog opens when you click the Add button on the Language Injections page, and choose Java Parameter from the context menu, or select an entry and click the Edit button.

Use this dialog to configure language injections for Java parameters. The dialog provides the ability to make use of IntelliLang's features, if, for any reason, the injection annotations cannot be used. This mainly applies to configuring third party/library methods as well as projects that still have to use Java 1.4.

Item

Description

Language

In this area, specify the language to inject and the injection context.

  • ID: select the ID of the language to inject.

  • Prefix: specify a prefix to make up the injection context.

  • Suffix: specify a suffix to make up the injection context.

Note that the Prefix and Suffix fields are optional.

Class Methods

Click the Browse button and select the class of interest. As a result, the methods of the class along with their parameters are shown.

Select the parameters for which you want to enable the injection.

Advanced

Specify additional settings.

  • Value pattern: type a regular expression for the injection context.

  • Single file: If the option is off, the fragments that match the value pattern are treated separately, as different "files" - for example from the fragment editor's viewpoint.

    If the option is on, the corresponding fragments are all merged together to form a single unit, or "file".

    Given the value pattern

    xxx (.+) yyy (.+) zzz

    and the fragment

    xxx select * yyy from family zzz,

    select * and from family are treated as two independent fragments (or "files") if the option is off. If the option is on, select * from family is treated as a single unit or "file".

Last modified: 29 November 2022