[Pharo-project] about push up IV
Hi lukas may be you already fixed it. Now when I push up a instance variables I get prompted with the complete list of instance variables even the ones of the superclasses. Stef
Hi Stef, Depends on where you trigger the refactoring from. You only get a list of instance variables when you trigger the refactoring from the class. You can avoid the extra step if you use the variable browser, or you select the variable in the source code. Lukas On 18 January 2012 20:46, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi lukas
may be you already fixed it. Now when I push up a instance variables I get prompted with the complete list of instance variables even the ones of the superclasses.
Stef
-- Lukas Renggli www.lukas-renggli.ch
Ok I see I should select the variable but if I select the class I do not need to see superclass variables because I should not been able to push them. BTW I thought about one cool refactoring this is push as subclassResponsibility :). Stef On Jan 18, 2012, at 9:06 PM, Lukas Renggli wrote:
Hi Stef,
Depends on where you trigger the refactoring from. You only get a list of instance variables when you trigger the refactoring from the class. You can avoid the extra step if you use the variable browser, or you select the variable in the source code.
Lukas
On 18 January 2012 20:46, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi lukas
may be you already fixed it. Now when I push up a instance variables I get prompted with the complete list of instance variables even the ones of the superclasses.
Stef
-- Lukas Renggli www.lukas-renggli.ch
On 18 January 2012 21:15, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Ok I see I should select the variable but if I select the class I do not need to see superclass variables because I should not been able to push them.
I find it convenient to be able to push up any variable in the hierarchy from any subclass ... So this is intentional.
BTW I thought about one cool refactoring this is push as subclassResponsibility :).
Refactor class > Realize Lukas -- Lukas Renggli www.lukas-renggli.ch
On Jan 18, 2012, at 9:30 PM, Lukas Renggli wrote:
On 18 January 2012 21:15, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Ok I see I should select the variable but if I select the class I do not need to see superclass variables because I should not been able to push them.
I find it convenient to be able to push up any variable in the hierarchy from any subclass ... So this is intentional.
Ok I see so this is push from your place to superclass. What I got is that doing a pull and after the inverse the class var was lost. I did not try to reproduce it but I added at end.
BTW I thought about one cool refactoring this is push as subclassResponsibility :).
Refactor class > Realize
I would call it abstractize because in general I have the concrete method. and Realize does not says that.
Lukas
-- Lukas Renggli www.lukas-renggli.ch
On 18 January 2012 21:15, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Ok I see I should select the variable but if I select the class I do not need to see superclass variables because I should not been able to push them.
I find it convenient to be able to push up any variable in the hierarchy from any subclass ... So this is intentional.
Ok I see so this is push from your place to superclass.
No, it always pushes up to the superclass of where the class is defined in.
What I got is that doing a pull and after the inverse the class var was lost. I did not try to reproduce it but I added at end.
Pull down is not the inverse of push up, because it only adds it to the subclasses where the variable is actually needed.
BTW I thought about one cool refactoring this is push as subclassResponsibility :).
Refactor class > Realize
I would call it abstractize because in general I have the concrete method. and Realize does not says that.
Not sure if such a word exists at all? Also the refactoring does the opposite: it makes an abstract class real, that is it implements all the abstract methods of the superclasses (see the explanation in the tooltip help). Lukas -- Lukas Renggli www.lukas-renggli.ch
participants (3)
-
Lukas Renggli -
Stéphane Ducasse -
Stéphane Ducasse