[Cuis-dev] Temporary to Instance Variable refactor

Eric Brandwein brandweineric at gmail.com
Sun May 19 17:23:58 PDT 2019


Thanks Hernán! I'll check your formatting changes so I can apply them in
future contributions. Is there a 'Smalltalk formatting guidelines' or
something that I could read to learn them? Maybe in the Terse Guide, I
haven't checked actually.

About the comments:

1) The pipes are currently left empty when the last temporary variable is
removed because it is not used, so I followed that convention. I do think
that they should be removed though, but then we should implement the same
behaviour when removing unused variables.

2) & 3) I'll look into them!

Cheers,
Eric

El dom., 19 may. 2019 17:52, Hernan Wilkinson <hernan.wilkinson at 10pines.com>
escribió:

> Hi Eric,
>  as I said before, great job! Nice implementation and very well tested.
>  It is on github now.
>
>  I made a few changes:
> 1) Changed from cmd+P to cmd+O (as you said cmd+T is used) (Juan, we will
> have to talk about shortcuts I guess, we are running out of them :-) )
> 2) Made some formatting changes to make it more "Smalltalk oriented" :-)
>
>  I have a few improvements to suggest that it would be great if you could
> do them:
> 1) When the temporal to refactor is the only one, the source code keeps
> the temp. definition pipes, the | |. It would be great if the were removed
> from the source code
> 2) When there is another method that defines the same temporary, it would
> be great that the error message would say the method and class to easily
> find it.
> What I do in this cases is to show the methods as elements in the menu so
> selecting them I can browse the method if necessary. Or you could show an
> option like "browse methods" or something like that to browse all those
> methods and therefore help to change those temporaries if necessary. Look
> for some examples in other refactorings and appliers...
> 3) The same thing when there are subclasses that define the inst. var.
>
>  Thank you again! this is a great contribution to Cuis. Keep doing more,
> we want more! :-)
>
> Cheers!
> Hernan.
>
> On Fri, May 17, 2019 at 7:27 PM Eric Brandwein <brandweineric at gmail.com>
> wrote:
>
>> I remember trying with Ctrl+shift+t and it being assigned to something
>> else. I don't have the environment at hand right now, but I'll confirm
>> later.
>>
>> El vie., 17 may. 2019 14:45, Hernan Wilkinson <
>> hernan.wilkinson at 10pines.com> escribió:
>>
>>> Great! I'll take a look at it. It is really useful now that var
>>> shadowing is not allowed.
>>> One thing, ctrl+ship+p is used in LiveTyping to show the types of the
>>> node under the cursor. What about using ctrl+shift+t ?
>>>
>>> Hernan
>>>
>>> PS:  Thank you for contributing to minimize the missing refactorings :-)
>>>
>>> On Fri, May 17, 2019 at 1:49 PM Eric Brandwein via Cuis-dev <
>>> cuis-dev at lists.cuis.st> wrote:
>>>
>>>> Hi all,
>>>>
>>>> In my view, Cuis is missing a lot of refactorings. To start with
>>>> something, here's a ChangeSet that adds the TemporaryToInstanceVariable
>>>> refactor, along with a ChangeSet that adds tests. I've associated the
>>>> <ctrl>+<shift>+P shortcut to it.
>>>>
>>>> To try it, just make a method with a temporary variable, place the
>>>> cursor above the temporary, and press the shortcut.
>>>>
>>>> Cheers,
>>>> Eric
>>>> --
>>>> Cuis-dev mailing list
>>>> Cuis-dev at lists.cuis.st
>>>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>>>
>>>
>>>
>>> --
>>>
>>> *Hernán WilkinsonAgile Software Development, Teaching & Coaching*
>>> *Phone: +54-011*-4893-2057
>>> *Twitter: @HernanWilkinson*
>>> *site: http://www.10Pines.com <http://www.10pines.com/>*
>>> Address: Alem 896, Floor 6, Buenos Aires, Argentina
>>>
>>
>
> --
>
> *Hernán WilkinsonAgile Software Development, Teaching & Coaching*
> *Phone: +54-011*-4893-2057
> *Twitter: @HernanWilkinson*
> *site: http://www.10Pines.com <http://www.10pines.com/>*
> Address: Alem 896, Floor 6, Buenos Aires, Argentina
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20190519/8f9daab6/attachment.html>


More information about the Cuis-dev mailing list