IntelliJ IDEA 13.1.0 Web Help

Refactor | Change Signature
Ctrl+F6Ctrl+F6Ctrl+6Ctrl+F6Ctrl+F6Ctrl+F6Ctrl+F6Ctrl+F6Shift+Alt+CCommand F6Command F6Alt Command C

Use this dialog to change the function signature and to perform other, related tasks.

Item Description
Return type Use this field to modify the function return type.


Code completion is available in this field and also in certain fields of the table that contains the function parameters.

Name Use this field to modify the function name.
Use the table and the controls to the right of it to manage the function parameters and their properties.
Type Use this field to specify the type of a parameter.
Name Use this field to specify the name of a parameter.
Initializer A value (or an expression) specified in this field is added to the function definition as the default parameter value.
Default value A value (or an expression) passed to the function in the function calls.
add or Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+Insert or Ctrl+NAlt+InsertCommand N or Control EnterControl N or Control EnterCommand N or Control Enter Use this icon or shortcut to start adding a new parameter.

Specify the parameter type, name, initializer, and the default value.

Note that you can propagate the parameters you have added to the calling methods.

delete or Alt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteCommand DeleteCommand DeleteCommand Delete Use this icon or shortcut to delete the selected parameter.
arrowUp or Alt+UpAlt+UpAlt+UpAlt+UpAlt+Up or Ctrl+Alt+AAlt+UpAlt+UpCtrl+Alt+UpCtrl+Shift+UpControl UpControl UpControl Alt Up Use this icon or shortcut to move the selected parameter one line up in the list of parameters.
arrowDown or Alt+DownAlt+DownAlt+DownAlt+DownAlt+Down or Ctrl+Alt+EAlt+DownAlt+DownCtrl+Alt+DownCtrl+Shift+DownControl DownControl DownControl Alt Down Use this icon or shortcut to move the selected parameter one line down in the list of parameters.
propagateParameters or Alt+G Use this icon or shortcut to propagate the added parameters to the calling methods.

You can propagate new function parameters to any function that directly or indirectly calls the function whose signature you are changing.

(There may be the functions that call the current function. These functions, in their turn, may be called by other functions. You can propagate new parameters to any of the functions in such sequences.)

In the left-hand pane of the Select Methods to Propagate New Parameters dialog, expand the necessary nodes and select the check boxes next to the functions you want the new parameters to be propagated to.

Signature Preview In this area, the current function signature is shown. (The information in this area is synchronized with the changes you are making to the function signature.)
Refactor Click this button to perform the refactoring right away.
Preview Click this button to see the expected changes prior to actually performing the refactoring.

See Also

Code Examples:


External Links:

Web Resources: