Extract Subclass Refactoring

Is there anyway to extract methods from a class into a subclass and get all the classes using the original class to now subclass the new class if they require the moved methods

10 comments

There is if you have Sixth & Red River's Refactor-J plugin.

0

Refactor-J includes an "Extract Class" refactoring, which is a bit different (and more powerful) than "Extract Subclass".

To do an "Extract Subclass", you basically have to use the built-in "Extract Superclass" refactoring with the appropriate checkboxes set. It's quite confusing, but does work.

Sixth and Red River Software
"Code with Grace and Verve"

0

Sixth and Red River Software wrote:

To do an "Extract Subclass", you basically have to use the built-in
"Extract Superclass" refactoring with the appropriate checkboxes set.
It's quite confusing, but does work.


Yes, it's confusing. Let's vote for
http://jetbrains.net/jira/browse/IDEA-4899

0

Keith, I gotta hand it to ya. You submit more Jira requests/bugs by 9:00 AM than most people do all day. :)

0

Marc Stock wrote:

Keith, I gotta hand it to ya. You submit more Jira requests/bugs by
9:00 AM than most people do all day. :)


I've reported 414 issues since JIRA opened, and I had about 225 in the
old tracker. Maybe I ask too much of JB.

0

Yes I tried the Extract Class Refactor but it is more of a create Delegate Class Refactor.

I cant see how you can use Extract SuperClass Refactor

0

Sorry, I saw a post on your blog about it but I guess that feature isn't coming until Refactor-J 2.0. Speaking of which...when is the 2.0 release planned?

0

To extract subclass, choose Extract Superclass and click "Rename
original class."

paul taylor wrote:

Yes I tried the Extract Class Refactor but it is more of a create Delegate Class Refactor.

I cant see how you can use Extract SuperClass Refactor

0


"Extract Subclass" is now planned for Demetra, not Refactor-J 2.0. Functionality and time-frame for Refactor-J 2.0 is still tenative, but we are currently targeting 3Q06.

Sixth and Red River Software
"Code with Grace and Verve"

0

Will there be some EAP versions before, so I can try out the
TypeRefactoring-feature very soon? ;)

Tom

0

Please sign in to leave a comment.