Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Splitting a class

Reply
Thread Tools

Splitting a class

 
 
Roedy Green
Guest
Posts: n/a
 
      07-15-2005
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/...s_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
Reply With Quote
 
 
 
 
Roland
Guest
Posts: n/a
 
      07-15-2005
On 15-7-2005 6:20, Roedy Green wrote:
> 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_/ /__/
/ \ /_/ / \
 
Reply With Quote
 
 
 
 
Tim Tyler
Guest
Posts: n/a
 
      07-15-2005
Roedy Green <(E-Mail Removed)> 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.
--
__________
|im |yler http://timtyler.org/ http://www.velocityreviews.com/forums/(E-Mail Removed) Remove lock to reply.
 
Reply With Quote
 
Wibble
Guest
Posts: n/a
 
      07-16-2005
Roedy Green wrote:
> 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...
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      07-16-2005
On Fri, 15 Jul 2005 20:19:26 -0400, Wibble <(E-Mail Removed)>
wrote or quoted :

>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/...s_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
Reply With Quote
 
Dale King
Guest
Posts: n/a
 
      07-16-2005
Roedy Green wrote:
> On Fri, 15 Jul 2005 20:19:26 -0400, Wibble <(E-Mail Removed)>
> wrote or quoted :
>
>
>>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.

--
Dale King
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
A parameterized class (i.e. template class / class template) is not a class? christopher diggins C++ 16 05-04-2005 12:26 AM
Re: Splitting up the definitions of a class into different files (splitting public from private)? John Dibling C++ 0 07-19-2003 04:41 PM
Re: Splitting up the definitions of a class into different files (splitting public from private)? Mark C++ 0 07-19-2003 04:24 PM
Re: Splitting up the definitions of a class into different files (splitting public from private)? John Ericson C++ 0 07-19-2003 04:03 PM



Advertisments