[Cuis-dev] Temporary to Instance Variable refactor

Hernan Wilkinson hernan.wilkinson at 10pines.com
Sun May 19 13:52:21 PDT 2019


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/de48a44c/attachment.html>


More information about the Cuis-dev mailing list