WebStorm 9.0.0 Web Help

Refactor | Extract Method

Note

In the JavaScript context, the title of the dialog box is Extract Function.

Item Description
Name In this text box, specify the name of the function or method to be generated on the basis of the selected source code.
Declare functional expression Select this check box to have the new function defined through a function expression, for example, new_method = function().

Note

The check box is only available when refactoring is invoked in the JavaScript context.

Parameters In this area, select parameters to be passed to the new method/function.

Tip

If any parameter that is critical for the functionality of the new method is not selected, WebStorm will be unable to proceed with the refactoring.

Move Up/Down Use these buttons to change the order of the parameters.
Signature preview In this read-only field, view the declaration of the new method/function.

See Also

Procedures:

External Links:

Web Resources: