is support WebStrom 'inline a method' refactoring?

Hello.
I recently started using WebStrom and I can not find 'Inline a method' in Refactoring.
I saw  'Inline...' but it inline only function (not method of object).


Use case:


MyClass.fooMethod = function() {
    return MyClass.barMethod();
};


MyClass.barMethod = function() {
    ....    
    return 'Hello World!';
};


I want inline method `barMethod` to `fooMetod`(and other place where used it method)
And expected result:

MyClass.fooMethod = function() {
    ....    
    return 'Hello World';
};

Can I somehow make it?


Thanks!

2 comments
Comment actions Permalink

This issue seems similar, take a look: http://youtrack.jetbrains.com/issue/WI-9254 .
Vote/comment for it, if it's the same.
See http://intellij-support.jetbrains.com/entries/23368682 if you are not familiar with YouTrack.

0
Comment actions Permalink

Refactor/Inline does this... Depending on your choice ('Inline and remove the fiunction' or 'inline this usage and keep the function') you get either

myClass1.fooMethod = function() {

    return 'Hello World!';
};



or

myClass1.fooMethod = function() {

    return 'Hello World!';
};



myClass1.barMethod = function() {


    

    return 'Hello World!';

};

0

Please sign in to leave a comment.