Splitting a class

R

Roedy Green

Is there some refactoring tool to use when you want to split a class
in two, so that you have a core set of methods and an extended set or
perhaps even two independent classes.

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
R

Roland

Is there some refactoring tool to use when you want to split a class
in two, so that you have a core set of methods and an extended set or
perhaps even two independent classes.
In Eclipse, you can use 'Refactor -> Pull Up' and 'Refactor -> Push
Down' to move members (fields and methods) up and down the class hierarchy.
--
Regards,

Roland de Ruiter
` ___ ___
`/__/ w_/ /__/
/ \ /_/ / \
 
T

Tim Tyler

Roedy Green said:
Is there some refactoring tool to use when you want to split a class
in two, so that you have a core set of methods and an extended set or
perhaps even two independent classes.

You can drag groups of selected methods between classes in the
Eclipse Package explorer.
 
W

Wibble

Roedy said:
Is there some refactoring tool to use when you want to split a class
in two, so that you have a core set of methods and an extended set or
perhaps even two independent classes.
Lol, now you're asking questions where eclipse is the answer...
 
R

Roedy Green

Lol, now you're asking questions where eclipse is the answer...

Pull up never seems to be applicable since I am usually splitting off
a sibling class. there is no hierarchy to push/pull to.

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
D

Dale King

Roedy said:
Pull up never seems to be applicable since I am usually splitting off
a sibling class. there is no hierarchy to push/pull to.

I agree and have often wished for a "Create superclass" refactoring to
create an empty super class that you can then "pull-up" to. It should
also support creating superclasses for a set of classes so that all are
then subclasses of the same superclass.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top