IntelliJ IDEA 12.1.0 Web Help

10.5+
Some features described here are available in Ultimate edition only.

Refactor | Extract Variable

Refactor | Extract Variable

Generally, this dialog is used to extract new variables. Depending on the language, there may be additional options, for example:

The following is available only in the Ultimate edition of IntelliJ IDEA

ItemDescriptionLanguage
10.5+TypeSelect the type of the new variable.ActionScript
NameSpecify the name for the new variable.All
Replace all occurrencesSelect this option to replace all the occurrences of the selected expression (if more than one occurrence of the selected expression is found).All
Declare finalSelect this option to declare the new variable final.Java
Var kindChoose to extract a (global) variable, a constant, or a local variable:
  • extract var - select this option to extract a global variable.
  • extract constant - select this option to extract a constant.
  • extract local variable - select this option to extract a local variable.

    Note

    The extract local variable option is available only for JavaScript 1.7 or a later version.

JavaScript
Make constantSelect this option to extract a constant rather than a variable.ActionScript

See Also

Procedures:

External Links:

Web Resources: