Make method non-static refactoring?

Hello,

Is it possible to change a static method to a nonstatic using some refactoring?

I.e I have

and I want

to become

The best I can think of is manually convert A.f function to nonstatic, calling it f2, then make A.f call a.f2, then inline A.f and rename f2 - ugly :(

5 comments
Comment actions Permalink

Unfortunately it is not possible, but I'm fighting for it a very long
time. Seems not to have any priority in St. Peterburg :(

Tom

0
Comment actions Permalink

Yes, yes, yes, me to! Where can i vote for this

0
Comment actions Permalink

Or this one http://www.intellij.net/tracker/idea/viewSCR?publicId=2957 for a straight forward 1 step Move Method refactoring.
If we could combine both scrs they would have more than 1000 votes!!!

Jacques

0
Comment actions Permalink

Jacques Morel wrote:

> Or this one
http://www.intellij.net/tracker/idea/viewSCR?publicId=2957 for
> a straight forward 1 step Move Method refactoring.


In the same department, the even simpler/really trivial/ no-brainer

on non static method : ok if can be made static at no cost.
http://www.intellij.net/tracker/idea/viewSCR?publicId=18762

is still "to be discussed". What's left to discuss? Isn't its benefits
obvious?

Alain

0

Please sign in to leave a comment.