i have to disagree. 99% of the time this is going to be used is when there is a method in a superclass which has become (or was always) irrellevant to one or more subclasses.
As it stands now you have to check-out from your version control system *every* subclass before doing this refactoring. You then have undo the changes to the ones you didn't want to effect and keep only the changes to the ones which you want to push the method down to. Unfortunately, in my case (and I suspect most cases) this makes the cut-and-paste manual method much quicker. I think the push-down dialogue should allow you to choose which subclasses to push-down to and then fail if the method is referenced from (or on) one of the subclasses (or subclasses thereof) which you have not selected. On Thursday 03 October 2002 17:31 pm, you wrote: >�Actually not. The refactoring takes care of the 'grunt work' for you. The >�behavior is maintained, so IDEA isn't introducing any weird side-effects. >�After the push-down, you can use "GoTo->Implementation(s)" to visit the >�subclasses that are supposed to be the 'exception to the rule' -- which is >�presumably why you're pushing things down. You remain in control at all >�times. >� >�I think in the future, a nice enhancement would be to be able to specify >�more detail in the type of push-down you want. For example, you could push >�down the method signature and a simple call to "super" as the > implementation for the subclasses, while leaving the current implementation > in the superclass. Then you could visit each subclass as necessary to > enhance or replace the baseclass implementation. The other option is to > fully push down the method into all the subclasses and remove the > implementation from the superclass entirely. But I feel that the current > implementation is fine for this version... it can be embellished later. >� >�"Richard S.Martin" <[EMAIL PROTECTED]> wrote in message >�news:[EMAIL PROTECTED]... >�> This seems kind of odd. Fowler's summary of "Push Down Member" is >�"Behaviour >�> on a superclass is relevant only for some of its subclasses." >�> >�> Surely pushing down to *every* subclass is totally pointless - If it was >�> relevent to every subclass you would have it on the superclass! >�> >�> On Wednesday 02 October 2002 17:11 pm, you wrote: >�> > Richard, >�> > "Push Members Down" currently pushes the members you have chosen to >�> > *all* subclasses of a class (to preserve original code behaviour). >�> > >�> > Friendly, >�> > Dmitry >�> > >�> > Richard S.Martin wrote: >�> > > I just trid to use this refactoring for the first time. My superclass >�has >�> > > several subclasses. I was expecting the dialogue to ask me which >�> > subclasses I > wanted the members to go into. Instead it failed because >�one >�> > of the > subclasses (which I didn't want the members to go into) was > not > > checked out > of my version control system. The last thing I want > to do is >�> > check it out, do > the refactoring, and then put the class back to how >�it >�> > was before. > >�> > > Is this a bug? Or a discrepency between my understanding of this >�> > refactoring > and IntelliJ's? >�> > > >�> > > >�> > > >�> > >�=========================================================================== >�> >=== > This email and any files transmitted with it are confidential and >�> > intended solely for the use of the individual or entity to whom they > are > > addressed. All information is the view of the individual and not > > > necessarily the company. If you are not the intended recipient you are > > > hereby notified that any dissemination, distribution, or copying of this > > > communication and its attachments is strictly prohibited. If you have > > > received this email in error please notify: > [EMAIL PROTECTED] > > > >�> > > >�> > > >�> > >�=========================================================================== >�> >=== > >�> > >�> > >�> >�> >�=========================================================================== >= == >�> This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they are > addressed. All information is the view of the individual and not > necessarily the company. If you are not the intended recipient you are > hereby notified that any dissemination, distribution, or copying of this > communication and its attachments is strictly prohibited. If you have > received this email in error please notify: >�> [EMAIL PROTECTED] >�> >�> >�> >�=========================================================================== >= == >�> >� >� >�_______________________________________________ >�Eap-bugs mailing list >�[EMAIL PROTECTED] >�http://lists.jetbrains.com/mailman/listinfo/eap-bugs >� ============================================================================== This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. All information is the view of the individual and not necessarily the company. If you are not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication and its attachments is strictly prohibited. If you have received this email in error please notify: [EMAIL PROTECTED] ============================================================================== _______________________________________________ Eap-bugs mailing list [EMAIL PROTECTED] http://lists.jetbrains.com/mailman/listinfo/eap-bugs
