Extracting Parameter in Groovy
This section discusses the Extract Parameter refactoring for Groovy. This refactoring lets you perform the following actions:
- Creating a new method parameter from the selected expression within a method. All the usages of the method will be auto-updated.
- Adding a parameter to a closure. If there is a variable, associated with the closure, the calls to this variable are replaced with the corresponding expressions.
In this section:
To extract a parameter in Groovy
- In the editor, place the cursor within the expression to be replaced by a parameter.
- Do one of the following:
- In the Extract Parameter dialog:
Last modified: 18 July 2017