Extract a field using the dialog
If the In modal dialogs refactoring option is selected in the Refactorings area on the Code Editing page of the Settings dialog (Control+Alt+S), the Extract Field refactoring is performed by means of the Extract Field. Introduce Field.
In the editor, select the expression or variable to be replaced with a field, or just place the caret within such an expression or variable declaration.
In the main menu, or the context menu of the selection, choose, or press Control+Alt+F.
From the Expressions list, select the expression to be replaced. Note that DataSpell highlights the selected expression in the editor.
In the dialog that opens, specify the type and name of the new field.
To automatically replace all occurrences of the selected expression (if it is found more than once), select the option Replace all occurrences.
Click OK to create the field.