IntelliJ IDEA 2017.2 Help

Extract Refactorings

In this section:

  • The way to extract constant, field, and variable refactorings are performed, depends on the setting of the Enable in-place refactoring check box in the Editor page of the Settings/Preferences dialog.
  • Extract refactorings are performed for the various expressions and blocks of code, including strings and substrings.

    Extract refactoring on substrings is supported for:

    • parts of strings with no formatting
    • parts of strings with concatenation via "+"
    • parts of strings with "%"-style formatting
    • parts of strings with "%()"-style formatting
    • new-style "str.format()" formatted strings
Last modified: 29 November 2017

See Also