Extract method should make holder class if multiple return types

Instead of just failing and not allowing the refactor, it should offer to make a holder class that will encapsulate all the objects that might be returned.

3 comments
Comment actions Permalink

That's already implemented in latest EAP (called "Extract Method Object"): http://www.jetbrains.net/confluence/display/IDEADEV/Diana+EAP

0
Comment actions Permalink

Hello Travis,

Moreover in the latest EAP if "Extract method" fails due to multiple exit
points "Extract method object" is suggested.

Thank you
-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

Instead of just failing and not allowing the refactor, it should offer
to make a holder class that will encapsulate all the objects that
might be returned.



0
Comment actions Permalink

Awesome! Looking forward to 7!

0

Please sign in to leave a comment.