Inline
WebStorm provides the following inline refactorings:
- The Inline Variable refactoring replaces redundant variable usage with its initializer. This refactoring is opposite to Extract Variable.
- The Inline Function/Method refactoring results in placing the method's or function's body into the body of its caller(s); the method or function is deleted. This refactoring is opposite Extract Method.
Inline Variable
JavaScript Example
Before | After |
---|---|
Parenizor.method('toString', function ()
{
var string = '(' + this.getValue() + ')';
return string;
} |
Parenizor.method('toString', function ()
{
return '(' + this.getValue() + ')';
} |
Inline Method or Function
To perform the inline refactoring
See Also
Procedures:
Last modified: 11 July 2016