How to make "extract method" preserve my formatting?

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

How to make "extract method" preserve my formatting?

patmaddox
The extract method refactoring works great but always formats my code in a way that I hate.  It indents certain things way too much, adds parens where I don't want them, etc.  Is there a way for it to preserve my formatting?  I wrote the code to be nice and readable to me, and I'd like to keep it that way.

Pat

_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: How to make "extract method" preserve my formatting?

Carla F. Griggio
Hi Pat,

I'm sorry, I'm not answering your question because I have no idea about that :P
But I'm interested in what do you consider readable code, would you give some examples contrasting to the formatting Pharo would choose? Sometimes I prefer my own formatting too.

Cheers!
Carla.

On Thu, Jul 15, 2010 at 6:44 PM, Pat Maddox <[hidden email]> wrote:
The extract method refactoring works great but always formats my code in a way that I hate.  It indents certain things way too much, adds parens where I don't want them, etc.  Is there a way for it to preserve my formatting?  I wrote the code to be nice and readable to me, and I'd like to keep it that way.

Pat

_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users


_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: How to make "extract method" preserve my formatting?

Lukas Renggli
In reply to this post by patmaddox
It is currently not possible to preserve the original formatting with
the "extract method" refactoring, since the refactoring causes quite
significant changes in two methods. You can however fine-tune the way
the refactoring engine should format code in such cases in the setting
browser.

Lukas

On 15 July 2010 23:44, Pat Maddox <[hidden email]> wrote:
> The extract method refactoring works great but always formats my code in a way that I hate.  It indents certain things way too much, adds parens where I don't want them, etc.  Is there a way for it to preserve my formatting?  I wrote the code to be nice and readable to me, and I'd like to keep it that way.
>
> Pat
>
> _______________________________________________
> Pharo-users mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users