Refactoring browser

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

Refactoring browser

MrGwen
Hi

For my master dissertation I'll work on the refactoring tools. Do you have
any suggestions to improve the refactoring browser and to add better
refactorings ?

Thanks in advance
Gwenael Casaccio

Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Damien Cassou-3
Hi Gwenaël,

the project you are interested in is hosted on SqueakSource:
http://www.squeaksource.com/RefactoringEngine.

I think that the main target for this project is to clean the code and
make the tests run.

2007/10/11, Gwenaël Casaccio <[hidden email]>:

> Hi
>
> For my master dissertation I'll work on the refactoring tools. Do you have
> any suggestions to improve the refactoring browser and to add better
> refactorings ?
>
> Thanks in advance
> Gwenael Casaccio
>
>

--
Damien Cassou


Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

MrGwen
Thanks, at this time I try to correct the different problems on the
refactoring browser unit tests.

2007/10/11, Damien Cassou <[hidden email]>:

> Hi Gwenaël,
>
> the project you are interested in is hosted on SqueakSource:
> http://www.squeaksource.com/RefactoringEngine.
>
> I think that the main target for this project is to clean the code and
> make the tests run.
>
> 2007/10/11, Gwenaël Casaccio <[hidden email]>:
> > Hi
> >
> > For my master dissertation I'll work on the refactoring tools. Do you have
> > any suggestions to improve the refactoring browser and to add better
> > refactorings ?
> >
> > Thanks in advance
> > Gwenael Casaccio
> >
> >
>
>
> --
> Damien Cassou
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Damien Cassou-3
Please commit directly to the main repository.

2007/10/12, Gwenaël Casaccio <[hidden email]>:

> Thanks, at this time I try to correct the different problems on the
> refactoring browser unit tests.
>
> 2007/10/11, Damien Cassou <[hidden email]>:
> > Hi Gwenaël,
> >
> > the project you are interested in is hosted on SqueakSource:
> > http://www.squeaksource.com/RefactoringEngine.
> >
> > I think that the main target for this project is to clean the code and
> > make the tests run.
> >
> > 2007/10/11, Gwenaël Casaccio <[hidden email]>:
> > > Hi
> > >
> > > For my master dissertation I'll work on the refactoring tools. Do you have
> > > any suggestions to improve the refactoring browser and to add better
> > > refactorings ?
> > >
> > > Thanks in advance
> > > Gwenael Casaccio
> > >
> > >
> >
> >
> > --
> > Damien Cassou
> >
> >
> >
> >
>
>

--
Damien Cassou


Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

mrgonza78
I don't know neither what Gwenaël's master dissertation is about nor what the effort would be, but I think that having a browser that can show you the changes a refactoring will perform before committing plus having the ability to select which of these changes apply or not would be really nice to have.
I've been working in the refactoring engine for my dissertation too (trait aware refactorings).
I also worked in the refactoring browser until I discovered the omnibrowser in the dev image which is far more better than the former.
On my way I fixed (or at least I made them pass) several failing tests. Also, other tests required user input during the running and I improved them so they can run silently. May be many of them were already fixed by this moment.
I have all of this in my image but I'm interested on joining the team responsible for this tool (if any)....how can I contribute with my two cents?
Alejandro

On 10/12/07, Damien Cassou <[hidden email]> wrote:
Please commit directly to the main repository.

2007/10/12, Gwenaël Casaccio < [hidden email]>:

> Thanks, at this time I try to correct the different problems on the
> refactoring browser unit tests.
>
> 2007/10/11, Damien Cassou < [hidden email]>:
> > Hi Gwenaël,
> >
> > the project you are interested in is hosted on SqueakSource:
> > http://www.squeaksource.com/RefactoringEngine.
> >
> > I think that the main target for this project is to clean the code and
> > make the tests run.
> >
> > 2007/10/11, Gwenaël Casaccio < [hidden email]>:
> > > Hi
> > >
> > > For my master dissertation I'll work on the refactoring tools. Do you have
> > > any suggestions to improve the refactoring browser and to add better
> > > refactorings ?
> > >
> > > Thanks in advance
> > > Gwenael Casaccio
> > >
> > >
> >
> >
> > --
> > Damien Cassou
> >
> >
> >
> >
>
>


--
Damien Cassou






Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Tapple Gao
On Fri, Oct 12, 2007 at 12:44:43PM -0300, Alejandro Gonzalez wrote:
>    I don't know neither what Gwenael's master dissertation is about nor what
>    the effort would be, but I think that having a browser that can show you
>    the changes a refactoring will perform before committing plus having the
>    ability to select which of these changes apply or not would be really nice
>    to have.

That is something I could put into DeltaStreams without much
trouble. I'll remember that for the future. Thanks for the
suggestion!

--
Matthew Fulmer -- http://mtfulmer.wordpress.com/
Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808

Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Philippe Marschall
In reply to this post by MrGwen
2007/10/11, Gwenaël Casaccio <[hidden email]>:
> Hi
>
> For my master dissertation I'll work on the refactoring tools. Do you have
> any suggestions to improve the refactoring browser and to add better
> refactorings ?

Kepp the formatting of methods.

Cheers
Philippe


Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Jason Rogers-4
How about making a rename method that works only in the current class
and one for the current hierarchy?  (I will admit being spoiled by
Eclipse's capability to do this in Java.)  I hate having to manually
rename a method and then delete the old definition after that.  More
annoying is when I have a class that has, for instance, #name and the
refactoring tells me that it's going to do this across all classes in
the image.

Creating accessors for iVars that have a corresponding method in the
hierarchy appends a numeric to the method name (eg. create accessor on
'name' => #name1 and #name:).  I would prefer to be able to disable
that behavior.  When I use this facility I know what I am doing and
don't want the extra help.

How about a refactoring that allows you to create a class side
initializer from iVars (perhaps giving you a list from which to choose
and order the iVars)?

I would also benefit from an extract local that would let you select
the context into which you would extract (eg. just at the inner block
level, one block up, to the method level, etc.).

Last, but not least, I have also been spoiled by Eclipse's QuickFix
capability, which is akin to refactorings usually.  Eg. I am writing a
class side method that calls an instance method with a passed in
parameter, but the instance method doesn't exist.  Eclipse would allow
you to save and then give you a QuickFix which would create the stub
of that method in the class by pressing CTRL+1 (or Apple+1) and select
from a list of possible quick fixes.

Sorry if I ranted... you asked for opinions. ;)

On 10/12/07, Philippe Marschall <[hidden email]> wrote:

> 2007/10/11, Gwenaël Casaccio <[hidden email]>:
> > Hi
> >
> > For my master dissertation I'll work on the refactoring tools. Do you have
> > any suggestions to improve the refactoring browser and to add better
> > refactorings ?
>
> Kepp the formatting of methods.
>
> Cheers
> Philippe
>
>
>
>


--
Jason Rogers

"I am crucified with Christ: nevertheless I live;
yet not I, but Christ liveth in me: and the life
which I now live in the flesh I live by the faith of
the Son of God, who loved me, and gave
himself for me."
    Galatians 2:20

Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Colin Putney
In reply to this post by MrGwen
2007/10/11, Gwenaël Casaccio <[hidden email]>:

> Hi
>
> For my master dissertation I'll work on the refactoring tools. Do  
> you have
> any suggestions to improve the refactoring browser and to add better
> refactorings ?

I'd like to see a new group of refactorings that can be invoked from  
the debugger. For example: ExtractMethod. When invoked from the  
debugger it would extract the method just like the RB does, then  
"split" the existing activation context into two and hook them up to  
the new methods. Or the reverse - InlineMethod would merge the two  
activation contexts.

Also, in the debugger you have perfect knowledge of the types  
involved, so you don't have to do any of this "You're smarter than  
the RB type inferencer" stuff.

Colin
Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Jason Rogers-4
On 10/12/07, Colin Putney <[hidden email]> wrote:

> 2007/10/11, Gwenaël Casaccio <[hidden email]>:
>
> > Hi
> >
> > For my master dissertation I'll work on the refactoring tools. Do
> > you have
> > any suggestions to improve the refactoring browser and to add better
> > refactorings ?
>
> I'd like to see a new group of refactorings that can be invoked from
> the debugger. For example: ExtractMethod. When invoked from the
> debugger it would extract the method just like the RB does, then
> "split" the existing activation context into two and hook them up to
> the new methods. Or the reverse - InlineMethod would merge the two
> activation contexts.
>
> Also, in the debugger you have perfect knowledge of the types
> involved, so you don't have to do any of this "You're smarter than
> the RB type inferencer" stuff.

Good point about the types!

--
Jason Rogers

"I am crucified with Christ: nevertheless I live;
yet not I, but Christ liveth in me: and the life
which I now live in the flesh I live by the faith of
the Son of God, who loved me, and gave
himself for me."
    Galatians 2:20

Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Lukas Renggli
In reply to this post by Jason Rogers-4
> How about making a rename method that works only in the current class
> and one for the current hierarchy?  (I will admit being spoiled by
> Eclipse's capability to do this in Java.)  I hate having to manually
> rename a method and then delete the old definition after that.  More
> annoying is when I have a class that has, for instance, #name and the
> refactoring tells me that it's going to do this across all classes in
> the image.

You can already do that with the RB in OmniBrowser (scoped refactorings).

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Jason Rogers-4
Oh, thanks.  I don't tend to use OmniBrowser.  I will from now on.

On 10/12/07, Lukas Renggli <[hidden email]> wrote:

> > How about making a rename method that works only in the current class
> > and one for the current hierarchy?  (I will admit being spoiled by
> > Eclipse's capability to do this in Java.)  I hate having to manually
> > rename a method and then delete the old definition after that.  More
> > annoying is when I have a class that has, for instance, #name and the
> > refactoring tells me that it's going to do this across all classes in
> > the image.
>
> You can already do that with the RB in OmniBrowser (scoped refactorings).
>
> Cheers,
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
>


--
Jason Rogers

"I am crucified with Christ: nevertheless I live;
yet not I, but Christ liveth in me: and the life
which I now live in the flesh I live by the faith of
the Son of God, who loved me, and gave
himself for me."
    Galatians 2:20

Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Bergel, Alexandre
In reply to this post by MrGwen
Most of refactoring operates on classboxes and methods. A lot of  
things can be made for packages and traits.
For example:
        - Slipping a package in 2
        - Merging two packages
        - Changing a reference in a package

Cheers,
Alexandre

On 12 Oct 2007, at 16:44, Gwenaël Casaccio wrote:

> Thanks, at this time I try to correct the different problems on the
> refactoring browser unit tests.
>
> 2007/10/11, Damien Cassou <[hidden email]>:
>> Hi Gwenaël,
>>
>> the project you are interested in is hosted on SqueakSource:
>> http://www.squeaksource.com/RefactoringEngine.
>>
>> I think that the main target for this project is to clean the code  
>> and
>> make the tests run.
>>
>> 2007/10/11, Gwenaël Casaccio <[hidden email]>:
>>> Hi
>>>
>>> For my master dissertation I'll work on the refactoring tools. Do  
>>> you have
>>> any suggestions to improve the refactoring browser and to add better
>>> refactorings ?
>>>
>>> Thanks in advance
>>> Gwenael Casaccio
>>>
>>>
>>
>>
>> --
>> Damien Cassou
>>
>>
>>
>>
>
>

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




Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Damien Cassou-3
In reply to this post by Philippe Marschall
2007/10/12, Philippe Marschall <[hidden email]>:
> 2007/10/11, Gwenaël Casaccio <[hidden email]>:
> > Hi
> >
> > For my master dissertation I'll work on the refactoring tools. Do you have
> > any suggestions to improve the refactoring browser and to add better
> > refactorings ?
>
> Kepp the formatting of methods.

This behavior is really inconvenient. When you have a method and you
operate a refactoring on it, the indentation and formatting is
completely changed, making the diff unreadable.

--
Damien Cassou


Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Damien Cassou-3
In reply to this post by mrgonza78
Hi Alejandro and Gwenaël,

the RefactoringEngine is located at:
http://www.squeaksource.com/RefactoringEngine.html. If you have things
to commit, please ask Marcus Denker (CC'ed) for an access. You can
also send me your mcz if Marcus does not answer.

Bye

2007/10/12, Alejandro Gonzalez <[hidden email]>:

> I don't know neither what Gwenaël's master dissertation is about nor what
> the effort would be, but I think that having a browser that can show you the
> changes a refactoring will perform before committing plus having the ability
> to select which of these changes apply or not would be really nice to have.
> I've been working in the refactoring engine for my dissertation too (trait
> aware refactorings).
> I also worked in the refactoring browser until I discovered the omnibrowser
> in the dev image which is far more better than the former.
> On my way I fixed (or at least I made them pass) several failing tests.
> Also, other tests required user input during the running and I improved them
> so they can run silently. May be many of them were already fixed by this
> moment.
> I have all of this in my image but I'm interested on joining the team
> responsible for this tool (if any)....how can I contribute with my two
> cents?
> Alejandro
>
>
> On 10/12/07, Damien Cassou <[hidden email] > wrote:
> > Please commit directly to the main repository.
> >
> > 2007/10/12, Gwenaël Casaccio < [hidden email]>:
> > > Thanks, at this time I try to correct the different problems on the
> > > refactoring browser unit tests.
> > >
> > > 2007/10/11, Damien Cassou < [hidden email]>:
> > > > Hi Gwenaël,
> > > >
> > > > the project you are interested in is hosted on SqueakSource:
> > > > http://www.squeaksource.com/RefactoringEngine.
> > > >
> > > > I think that the main target for this project is to clean the code and
> > > > make the tests run.
> > > >
> > > > 2007/10/11, Gwenaël Casaccio < [hidden email]>:
> > > > > Hi
> > > > >
> > > > > For my master dissertation I'll work on the refactoring tools. Do
> you have
> > > > > any suggestions to improve the refactoring browser and to add better
> > > > > refactorings ?
> > > > >
> > > > > Thanks in advance
> > > > > Gwenael Casaccio
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Damien Cassou
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
> > --
> > Damien Cassou
> >
> >
> >
> >
>
>
>
>
>

--
Damien Cassou


Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Chris Muller-3
In reply to this post by Damien Cassou-3
True, unless the code was formatted with the RB Formatter in the first place.

I tweaked my image so that Alt+Shift+S RB formats and incorporated it
into my "save gesture".  Therefore, as more of my code becomes
formatted per the RB Formatter, the diffs are true.  I tweaked the RB
Formatter to format in Rectangular Block recommended by Kent Beck.

What's even MORE inconvenient is the way, starting in the 3.9 image,
RB Formatter now strips (some) comments out of your code.  Not a very
good thing to do, given the seeming high-advocacy for commenting code
in this community; our own tools are working against us in this
matter!

I fixed at least a couple of comment-stripping plague from the various
RbNodes but there is still at least one more.  :(


On 10/15/07, Damien Cassou <[hidden email]> wrote:

> 2007/10/12, Philippe Marschall <[hidden email]>:
> > 2007/10/11, Gwenaël Casaccio <[hidden email]>:
> > > Hi
> > >
> > > For my master dissertation I'll work on the refactoring tools. Do you have
> > > any suggestions to improve the refactoring browser and to add better
> > > refactorings ?
> >
> > Kepp the formatting of methods.
>
> This behavior is really inconvenient. When you have a method and you
> operate a refactoring on it, the indentation and formatting is
> completely changed, making the diff unreadable.
>
> --
> Damien Cassou
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Damien Cassou-3
2007/10/16, Chris Muller <[hidden email]>:

> True, unless the code was formatted with the RB Formatter in the first place.
>
> I tweaked my image so that Alt+Shift+S RB formats and incorporated it
> into my "save gesture".  Therefore, as more of my code becomes
> formatted per the RB Formatter, the diffs are true.  I tweaked the RB
> Formatter to format in Rectangular Block recommended by Kent Beck.
>
> What's even MORE inconvenient is the way, starting in the 3.9 image,
> RB Formatter now strips (some) comments out of your code.  Not a very
> good thing to do, given the seeming high-advocacy for commenting code
> in this community; our own tools are working against us in this
> matter!
>
> I fixed at least a couple of comment-stripping plague from the various
> RbNodes but there is still at least one more.  :(


Could you publish your code so that everybody can access it? It's cool
to fix things, it's even cooler when other people can benefit from
your work :-)


--
Damien Cassou

Reply | Threaded
Open this post in threaded view
|

RE: Refactoring browser

Ramon Leon-5
> > I tweaked my image so that Alt+Shift+S RB formats and
> incorporated it
> > into my "save gesture".  Therefore, as more of my code becomes
> > formatted per the RB Formatter, the diffs are true.  I
> tweaked the RB
> > Formatter to format in Rectangular Block recommended by Kent Beck.
> >
> > What's even MORE inconvenient is the way, starting in the
> 3.9 image,
> > RB Formatter now strips (some) comments out of your code.  
> Not a very
> > good thing to do, given the seeming high-advocacy for
> commenting code
> > in this community; our own tools are working against us in this
> > matter!
> >
> > I fixed at least a couple of comment-stripping plague from
> the various
> > RbNodes but there is still at least one more.  :(
>
>
> Could you publish your code so that everybody can access it?
> It's cool to fix things, it's even cooler when other people
> can benefit from your work :-)
> --
> Damien Cassou

Seconded, I want those fixes as well.

Ramon Leon
http://onsmalltalk.com 


Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Chris Muller-4
In reply to this post by Damien Cassou-3
http://bugs.squeak.org/view.php?id=6734

On 10/16/07, Damien Cassou <[hidden email]> wrote:

> 2007/10/16, Chris Muller <[hidden email]>:
> > True, unless the code was formatted with the RB Formatter in the first place.
> >
> > I tweaked my image so that Alt+Shift+S RB formats and incorporated it
> > into my "save gesture".  Therefore, as more of my code becomes
> > formatted per the RB Formatter, the diffs are true.  I tweaked the RB
> > Formatter to format in Rectangular Block recommended by Kent Beck.
> >
> > What's even MORE inconvenient is the way, starting in the 3.9 image,
> > RB Formatter now strips (some) comments out of your code.  Not a very
> > good thing to do, given the seeming high-advocacy for commenting code
> > in this community; our own tools are working against us in this
> > matter!
> >
> > I fixed at least a couple of comment-stripping plague from the various
> > RbNodes but there is still at least one more.  :(
>
>
> Could you publish your code so that everybody can access it? It's cool
> to fix things, it's even cooler when other people can benefit from
> your work :-)
>
>
> --
> Damien Cassou
>

Reply | Threaded
Open this post in threaded view
|

Re: Refactoring browser

Damien Cassou-3
I have updated the bug report. Can someone have a look at the AST mcz
I have attached to the bug report and integrate it if it's ok?

Thank you

2007/10/19, Chris Muller <[hidden email]>:

> http://bugs.squeak.org/view.php?id=6734
>
> On 10/16/07, Damien Cassou <[hidden email]> wrote:
> > 2007/10/16, Chris Muller <[hidden email]>:
> > > True, unless the code was formatted with the RB Formatter in the first place.
> > >
> > > I tweaked my image so that Alt+Shift+S RB formats and incorporated it
> > > into my "save gesture".  Therefore, as more of my code becomes
> > > formatted per the RB Formatter, the diffs are true.  I tweaked the RB
> > > Formatter to format in Rectangular Block recommended by Kent Beck.
> > >
> > > What's even MORE inconvenient is the way, starting in the 3.9 image,
> > > RB Formatter now strips (some) comments out of your code.  Not a very
> > > good thing to do, given the seeming high-advocacy for commenting code
> > > in this community; our own tools are working against us in this
> > > matter!
> > >
> > > I fixed at least a couple of comment-stripping plague from the various
> > > RbNodes but there is still at least one more.  :(
> >
> >
> > Could you publish your code so that everybody can access it? It's cool
> > to fix things, it's even cooler when other people can benefit from
> > your work :-)
> >
> >
> > --
> > Damien Cassou
> >
>


--
Damien Cassou

12