Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2005

Tip: Looking for answers? Try searching our database.

Splitting a class

Thread view: 
Roedy Green - 15 Jul 2005 05:20 GMT
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.

Signature

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

Roland - 15 Jul 2005 09:30 GMT
> 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.
Signature

Regards,

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

Tim Tyler - 15 Jul 2005 22:17 GMT
Roedy Green <look-on@mindprod.com.invalid> wrote or quoted:

> 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.
Signature

__________
|im |yler  http://timtyler.org/  tim@tt1lock.org  Remove lock to reply.

Wibble - 16 Jul 2005 01:19 GMT
> 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...
Roedy Green - 16 Jul 2005 11:30 GMT
>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.

Signature

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

Dale King - 16 Jul 2005 21:29 GMT
>>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.

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.

Signature

 Dale King



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.