IntelliJ IDEA 2021.1 Help

Change Signature for Scala

Refactor | Change Signature
Ctrl+F6

Use this dialog to perform the Change Signature refactoring.

Use the available controls to make changes to the method signature. Specify how the method calls should be handled.

Click Refactor to perform the refactoring right away. Click Preview to see the potential changes in the Find tool window prior to the actual refactoring.

ItemDescription
VisibilitySelect the method visibility scope (access level modifier) from the list.
Return type

Use this field to modify the method return type.

Code completion Ctrl+Space is available in this field, and also in other fields used for specifying the types.

NameUse this field to modify the method name.
Modify method callsThe existing method calls are modified so that the method with the new signature is called.
Add to definitionIf this option is selected, new parameters are added to a method definition.
Specify result typeUse this option to configure type annotation settings.
Signature PreviewIn this area, the current method signature is shown. (The information in this area is synchronized with the changes you are making to the method signature.)

In the area where parameters are specified, you can add new ones, edit, reorder or delete the existing ones. The refactoring will distribute your changes accordingly.

To start editing a parameter, click it. Alternatively, use the Up and Down arrow keys to navigate to the parameter of interest and Enter to start modifying it.

ItemTooltip and shortcutDescription
Icons general addAdd
Alt+Insert

Use this icon or shortcut to start adding a new parameter.

Specify the parameter information in the corresponding fields. (The default parameter value is the value (or the expression) to be passed to the method in the method calls.)

Icons general removeRemove
Alt+Delete
Use this icon or shortcut to delete the selected parameter.
Icons actions previous occurenceUp
Alt+Up
Use this icon or shortcut to move the selected parameter one line up in the list of parameters.
Icons actions next occurenceDown
Alt+Down
Use this icon or shortcut to move the selected parameter one line down in the list of parameters.
Icons general add

Add parameter clause

Alt + =

Use this icon or shortcut to add as additional group of parameters.
Add parameter clause
Icons general remove

Remove parameter clause

Alt + -

Use this icon or shortcut to remove an existing parameter clause.
Last modified: 08 March 2021