Pharo Refactoring Tool

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Pharo Refactoring Tool

ashubair
Hi,

I'm a Masters student at Ryerson University (Dr.Dave Mason is my
supervisor), and my thesis project is to significantly improve the
refactoring capabilities of Pharo/Squeak.  There was an interesting thread
on this back on August 6th, but I would welcome anyone's input on what I
should consider.  My starting point is to bring Pharo up to the level of
Eclipse
(seehttp://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/concept-refactoring.htm
) but I would love to hear from experienced Smalltalkers about
refactorings that are important to them.

Thanks,

Alia



Reply | Threaded
Open this post in threaded view
|

Re: Pharo Refactoring Tool

Alexandre Bergel
Hi Alia,

This is really cool!
I would love to have refactoring on packages:
  - cutting a packages in two
  - Extracting unit test from a big package into a dedicated test package
  - Moving a method as a class extension (I did such an extension in O2, it would be good to have it in OB)

Not related to packages:
  - Method renaming that use unit tests to identify which calling methods need to be affected by the renaming


Cheers,
Alexandre


On 19 Jan 2011, at 14:56, [hidden email] wrote:

> Hi,
>
> I'm a Masters student at Ryerson University (Dr.Dave Mason is my
> supervisor), and my thesis project is to significantly improve the
> refactoring capabilities of Pharo/Squeak.  There was an interesting thread
> on this back on August 6th, but I would welcome anyone's input on what I
> should consider.  My starting point is to bring Pharo up to the level of
> Eclipse
> (seehttp://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/concept-refactoring.htm
> ) but I would love to hear from experienced Smalltalkers about
> refactorings that are important to them.
>
> Thanks,
>
> Alia
>
>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






Reply | Threaded
Open this post in threaded view
|

Re: Pharo Refactoring Tool

Stéphane Ducasse
In reply to this post by ashubair
Welcome and excellent!!!!!!!

You should check the Refactoring integration in Omnibrowser.
        I would love to have move to class side/move to instance side.
        I would love to have a deprecate method refactoring.
        Better extract parameter.
You should have a look at the results of the campsmalltalk on refactoring improvement.

From the UI point of view I would love to have the rename refactoring class and rename refactoring method
        higher in the menu and not hidden inside submenu


What I would love to have is
        - better interface for SmallLint and their results.
        - a better way to scope refactoring.

Stef
       

> Hi,
>
> I'm a Masters student at Ryerson University (Dr.Dave Mason is my
> supervisor), and my thesis project is to significantly improve the
> refactoring capabilities of Pharo/Squeak.  There was an interesting thread
> on this back on August 6th,

do you have the link?

> but I would welcome anyone's input on what I
> should consider.  My starting point is to bring Pharo up to the level of
> Eclipse
> (seehttp://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/concept-refactoring.htm
> ) but I would love to hear from experienced Smalltalkers about
> refactorings that are important to them.
>
> Thanks,
>
> Alia
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Pharo Refactoring Tool

Stéphane Ducasse
In reply to this post by Alexandre Bergel

On Jan 19, 2011, at 7:19 PM, Alexandre Bergel wrote:

> Hi Alia,
>
> This is really cool!
> I would love to have refactoring on packages:
>  - cutting a packages in two
>  - Extracting unit test from a big package into a dedicated test package
>  - Moving a method as a class extension (I did such an extension in O2, it would be good to have it in OB)

yes

> Not related to packages:
>  - Method renaming that use unit tests to identify which calling methods need to be affected by the renaming

could be cool indeed.

Stef

>
>
> Cheers,
> Alexandre
>
>
> On 19 Jan 2011, at 14:56, [hidden email] wrote:
>
>> Hi,
>>
>> I'm a Masters student at Ryerson University (Dr.Dave Mason is my
>> supervisor), and my thesis project is to significantly improve the
>> refactoring capabilities of Pharo/Squeak.  There was an interesting thread
>> on this back on August 6th, but I would welcome anyone's input on what I
>> should consider.  My starting point is to bring Pharo up to the level of
>> Eclipse
>> (seehttp://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/concept-refactoring.htm
>> ) but I would love to hear from experienced Smalltalkers about
>> refactorings that are important to them.
>>
>> Thanks,
>>
>> Alia
>>
>>
>>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Pharo Refactoring Tool

Mariano Martinez Peck
In reply to this post by ashubair
Hi Alia. Welcome. It is really cool your idea. I hope you can get there. A couple of things:

- Iterate. Don't wait the last minute to commit/pubish/announce/integrate in pharo. Give and ask for feedback frequently.
- Pharo welcomes you code and fixes. Publish/Commit frequently. Even if you have something not working 100% it is better you publish and Pharo can integrate your changes step by step.
- Ask people for feedback and ideas. Write them down.

Now, technical. the thing I would love to have to the Pharo "IDE" (not only to refactors), is keyboard shortcuts. I don't care at all the relation between Smalltalk and the mouse (I was not even born). I hate the mouse, and Pharo makes me use muuuuuuch more than I want. It makes me slow. I developed 3 years with Eclipse and I remember being even hours without using the mouse. Check the mailing list and you will see there are millions of mails about it.

So....if you can add shortcuts for all current refactoring tools, for me is more than enought ;)   Check the project KeyBindings that Guillermo Polito is working on.

Good luck and keep us informed.

mariano

On Wed, Jan 19, 2011 at 6:56 PM, <[hidden email]> wrote:
Hi,

I'm a Masters student at Ryerson University (Dr.Dave Mason is my
supervisor), and my thesis project is to significantly improve the
refactoring capabilities of Pharo/Squeak.  There was an interesting thread
on this back on August 6th, but I would welcome anyone's input on what I
should consider.  My starting point is to bring Pharo up to the level of
Eclipse
(seehttp://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/concept-refactoring.htm
) but I would love to hear from experienced Smalltalkers about
refactorings that are important to them.

Thanks,

Alia




Reply | Threaded
Open this post in threaded view
|

Re: Pharo Refactoring Tool

Tim M
In reply to this post by ashubair
[hidden email] wrote:

> should consider.  My starting point is to bring Pharo up to the level of
> Eclipse
> (seehttp://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/concept-refactoring.htm
> ) but I would love to hear from experienced Smalltalkers about
> refactorings that are important to them.

A reasonable equivalence with eclipse would be awesome (Ideally, if you
can find some time to observe java developers using Intelli-J - you
really say how they play the IDE like a piano). We are often too mouse-y
in Smalltalk, but we don't have to be (its been great seeing some of the
keyboard shortcuts introduced in Pharo).

Some really useful refactorings are:

- extract setUp method (this one is missing in all IDE's). Write a test
with no setup, and then you want to take the initialisation of a
variable at the top of a method and move it to a test setup method
(possibly extracting an instance variable as well).

- extract sub-component (or delegate or policy) - eg. extract out a
method into another class and call it via an instance variable (eg.
delegate behavior)

- extract to local variable, and inline local variable are also very
common eclipsy things that we seem to miss at a local method level in
smalltalk as well

Tim


Reply | Threaded
Open this post in threaded view
|

Re: Pharo Refactoring Tool

Alexandre Bergel
> Some really useful refactorings are:
>
> - extract setUp method (this one is missing in all IDE's). Write a test with no setup, and then you want to take the initialisation of a variable at the top of a method and move it to a test setup method (possibly extracting an instance variable as well).
>
> - extract sub-component (or delegate or policy) - eg. extract out a method into another class and call it via an instance variable (eg. delegate behavior)
>
> - extract to local variable, and inline local variable are also very common eclipsy things that we seem to miss at a local method level in smalltalk as well


Oh yes!
There is a whole range of useful refactorings for unit tests that I would love to have.
 - Cutting a unit test in two. For example, moving a method category into a new unit test
 - Structure unit tests along the hierarchy of the tested classes
 - extract the setUp, tearDown, and resources

In general, there is research field about unit tests that is here to explore:
  - reducing the duplication between unit tests
  - reducing the redundancy in tests (do I test twice the same thing?)
  - if I want to test a method, where should I start? By writing a new unit test or extending an existing one?
  - Having a button 'generate test' in the pre-debugger, to be sure that an error will never happen
  - ...

Here, at the UChile, we are particularly interested in these issues.

Cheers,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






Reply | Threaded
Open this post in threaded view
|

Re: Pharo Refactoring Tool

Lukas Renggli
In reply to this post by Stéphane Ducasse
>        I would love to have move to class side/move to instance side.

That has been there since the beginning of Pharo: Refactor Method ->
Move to instance-side/Move to class-side.

A bit less old is the possibility to drag and drop methods and
categories onto the instance- and class-side buttons.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: Pharo Refactoring Tool

Stéphane Ducasse

On Jan 20, 2011, at 6:37 AM, Lukas Renggli wrote:

>>        I would love to have move to class side/move to instance side.
>
> That has been there since the beginning of Pharo: Refactor Method ->
> Move to instance-side/Move to class-side.

ok so I never see it.


>
> A bit less old is the possibility to drag and drop methods and
> categories onto the instance- and class-side buttons.
>
> Lukas
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>


Reply | Threaded
Open this post in threaded view
|

Re: Pharo Refactoring Tool

ashubair
In reply to this post by ashubair
Hi all,

I'm really more than happy to be one of your super-active and supportive
community..
Thank you for your ideas, and I will try my best to keep you updated with
any achieved preogress..
Any new ideas are more than welcome!

Mr.Ducasse, seems that the thread has been deleted from my inbox by
mistake, I'll try to look for it in the archive and I'll get back to you
as soon as I find it..

Mr.Peck, thanks for your valuable advice.

Thanks all for your time and suggestions,

Alia