I don't believe there is a fully automated way to do this, but I would have Plugh.foo() bar.foo() , then use Quick Fix (control-1) to create bar.foo() , then cut it out and insert the (remaining) body of Plugh.foo() into bar.foo() .
Then insert all the calls into Plugh.foo() and do the initial assignment inside bar.foo() : Bar bar = this; , then insert local (and maybe clear all this. in the method).
Carl Manaster
source share