Project: JDT
Bug 224429 [extract method] Destination type not pickable if extracting method from local class's initializer.
Reported: 2008-03-27 14:31:25 | Status: resolved fixed

Build ID: M20080221-1800 Usually the extract method wizard let's the user pick the destination type if the selected logic resides in a local anonymous class. The choice of destination types is wrongly not offered if the selected logic resides in an initializer of the local anonymous class. Steps To Reproduce: Select the statement on LINE 4, and see that the extract method wizard doesn't offer a choice of destination types. ----------------- Bug.java ----------------------- class Bug{ Bug(){ new Object(){{ System.out.println();//LINE 4 }};}}

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodRefactoring.java