IntelliJ IDEA 2018.3 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.

Item

Description

Visibility

Select 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.

Name

Use this field to modify the method name.

Modify method calls

The existing method calls are modified so that the method with the new signature is called.

Add to definition

If this option is selected, new parameters are added to a method definition.

Specify result type

Use this option to configure type annotation settings.

Signature Preview

In 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.

Item

Tooltip and shortcut

Description

icons general add svg

Add
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 remove svg

Remove
Alt+Delete

Use this icon or shortcut to delete the selected parameter.

icons actions previousOccurence svg

Up
Alt+Up

Use this icon or shortcut to move the selected parameter one line up in the list of parameters.

icons actions nextOccurence svg

Down
Alt+Down

Use this icon or shortcut to move the selected parameter one line down in the list of parameters.

icons general add svgAdd parameter clause

Alt+=

Use this icon or shortcut to add as additional group of parameters.

Add parameter clause

icons general remove svg

Remove parameter clause

Alt+-

Use this icon or shortcut to remove an existing parameter clause.

Last modified: 1 February 2019