Community
Participate
Working Groups
Build Identifier: M20100211-1343 Fowler, the author of the refactoring book that everybody references, says of the Extract Class refactoring: "Create a new class and move the relevant fields and methods from the old class into the new class." (http://www.refactoring.com/catalog/extractClass.html). The Extract Class in Eclipse only moves the fields. For Bug 268675 - [extract class] Refactor/Extract Class seems incomplete, Dani Megert states: "this is as designed: the refactoring is there to encapsulate fields into a new class and not to move methods." This is counter to the most widely used definition. Either this refactoring should be renamed or (better) the missing move methods functionality should be added. IntelliJ's Extract Class does this, although buggily. Reproducible: Always Steps to Reproduce: 1. Use Eclipse to edit a Java class 2. Refactor->Extract Class 3. A popup appears in which there are fields but no methods.
Move to JDT/UI
The Move Instance Method refactoring currently only works for a single method (bug 47712). Once that works for multiple methods, we could consider using it for Extract Class as well.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
This still applies to Eclipse 2019-06. It's worth to note that the "Extract superclass" refactoring allows to select methods as well.