Inline
Shortcut: CtrlAlt0N
Use the Inline refactoring to reverse the extract refactoring for a method or a variable.
Place the caret at the code fragment you want to inline.
Press CtrlAlt0N. Alternatively, right-click the code fragment and go to the Refactor menu. Select the inline refactoring that you need.
In the dialog, specify the inlining options.
(Optional) Select Preview to preview changes.
Preview and apply changes.
Inline Function/Method results in placing method's body into the body of its caller(s).
Before | After |
---|---|
| Inline all invocations and remove declaration
Inline all invocations and keep declaration
Inline this invocation only and keep declaration
|
Thanks for your feedback!
Was this page helpful?