reduce duplicate code in class hierarchy?

I'm trying to factor some functionality out of a bunch of classes by moving that code into a superclass. I've created the superclass, and I can identify several methods that have the same implementation in many (but not all) of the classes, but I'm looking for a refactoring operation or series of steps that will put a common implementation in the superclass and remove the overriding methods from the subclasses that use that implementation.

For now, I'm doing a "pull members up" to move one subclass' implementation to the superclass, and a "view method hierarchy" to get to each of the other subclasses' implementations, and removing the method if it matches the superclass implementation.

Is there some combination of existing refactorings, "replace method code duplicates", structural search, and other cleverness that will let Idea do more of this work for me?

Please sign in to leave a comment.