#37 Inline Variable

code, refactoring, variable, inline, refactor this

Inline Variable

Opposite to Tip #36 Extract to Variable, the inline variable refactor allows you to replace the usages of a variable with the underlying value/expression of the variable.

Press Ctrl+T (Windows/Linux: Ctrl+Shift+Alt+T) to invoke the Refactor This pop up, or choose Refactor | Refactor This from the menus, then select 0. Inline... from the list.

Alternatively, press Cmd+Alt+N/Ctrl+Alt+N to directly invoke the inline variable action on the symbol under the cursor.

Further Reading

Related Tips

Blog Comments powered by Disqus.