Inline Variable Refactoring for JavaScript / ActionScript
September 21st, 2009 by Maxim MossienkoNext version of IntelliJ IDEA, code named Maia, brings you several new JavaScript and ActionScript refactorings. In this post we showcase one of them — Inline Variable, which works with local variables and ActionScript class fields.

Pressing Control+Alt+N (default Windows keymap) replaces variable occurrences with an initializing expression.

During the inline process, IntelliJ IDEA checks if a variable can be safely replaced and warns if, for example, there are its usages inside a functional expression.
By the way, the Inline Variable refactoring also works in the left part of local variable assignment.
Enjoy developing with pleasure!
Tags: actionscript, Flex, inline variable, javascript, maia, refactoring

Leave a Reply