Stef, As the self-appointed formatting pedant (you'll find I come by the title honestly<g>), I would be happy to test the work. Lukas is right that it is a tough problem, but the RB authors seem to see comments as a waste of time, so I never sensed any real desire on their part to keep formatting. It is a shame, because it greatly reduces the value of the RB to me, and probably others.
As an example, I go so far as to comment out parts of cascades and replace the lines with modified code. The comments start with month-year, and have saved my skin more often than I care to count. I might have mentioned finding three bugs in a long-standing package of mine that I recently ported from Dolphin; without comments of the type I metion, I would probably still be looking for them. Bill -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Stéphane Ducasse Sent: Sunday, September 20, 2009 2:35 AM To: [email protected] Subject: Re: [Pharo-project] Is there a way to use rename refactor while preserving whitespace formatting in refactored methods? Lukas Gwenael changed the RBParser and AST to preserve code formatting. He never understood why nobody did look at what he did. Now when marcus will be in the team I would really like to have a look so that the work on gwenael is not lost because he worked 4 months on that. But if someone is interested it would be good to check. Stef On Sep 20, 2009, at 9:16 AM, Lukas Renggli wrote: >> Hi, I am using Pharo with the default browser, which is the >> OmniBrowser. When I right-click on a message name in the right-most >> panel and choose "rename refactor" from the menu, enter the new name >> and accept, the message sends are renamed, but the whitespace >> formatting in those refactored methods is not preserved. Is there any >> way at present to do this while keeping the formatting intact? > > Automatic refactoring that preserve the formatting are extremely > difficult to implement. In a common case, like with the rewrite engine > that the refactoring browser is using internally, this is not really > feasible. It is much easier to write your own formatter that formats > as you like, even if writing a working formatter is not trivial > either. > > For details listen to what the original authors of the Refactoring > Browser say about code formatting: > <http://www.cincomsmalltalk.com/blog/blogView?entry=3426663681>. > > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
