Bug 6502 - Extract Class Refactoring [refactoring]
Summary: Extract Class Refactoring [refactoring]
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-03 09:41 EST by Channing Walton CLA
Modified: 2009-08-30 02:21 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Channing Walton CLA 2001-12-03 09:41:59 EST
I would like to have an extract class refactoring do that I can extract inner 
classes or anonymous classes.
Comment 1 Adam Kiezun CLA 2002-02-27 11:26:02 EST
for consideration after 2.0
Comment 2 Eric Nickell CLA 2002-06-11 16:48:27 EDT
I hope I'm not overstepping bounds by attempting to summarize here various
requests found in bugzilla about refactoring inner or nested classes.

There are at least 5 feature requests that are related to this: Bug 6502, Bug
10604, Bug 10659, Bug 12082, Bug 12414.  It wouldn't surprise me if one or more
of these are declared duplicates.

Here is what people are asking for (I believe):

(A) Promote static inner class to own compilation unit (Bug 6502, Bug 10604?,
Bug 12082, Bug 12414)

(B) Promote anonymous class to own compilation unit.

(C) Promote named inner class to outer class is same compilation unit (Bug 10604
alternate interpretation).

(D) Convert anonymous class to named inner class.  "Final local variables used
by the anonymous class should be made to fields of the inner class, initialized
through the constructor."  (Bug 10659)

(E) Move static inner class to static inner class of different outer class. (Bug
12082, Bug 12414)

(F) Move compilation to becomes static inner class of another outer class. (Bug
12414)

Personal opinion: I suspect that the above requests should be fulfilled with one
or two parameterized refactorings.

Bug 10604 also requests mechanisms to create inner classes from static methods,
and to convert static inner classes with all static methods to instance class.
Comment 3 Dirk Baeumer CLA 2002-07-25 14:22:32 EDT
BTW, nice refactoring bug summary. Something like this is always wellcome.
Comment 4 Dirk Baeumer CLA 2003-04-28 06:04:07 EDT
Chaning state from assigned later to resolved later. Assigned later got 
introduced by the last bug conversion and is not a supported Eclipse bug state.
Comment 5 Denis Roy CLA 2009-08-30 02:21:40 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.