[Pharo-project] Is there a way to use rename refactor while preserving whitespace formatting in refactored methods?

Stéphane Ducasse stephane.ducasse at inria.fr
Sun Sep 20 05:12:20 EDT 2009


>> Gwenael changed the RBParser and AST to preserve code formatting.
>> He never understood why nobody did look at what he did.
>
> I looked at it. The code did not work for me at all (it broke
> everything), so I couldn't test it.

I will check that with him because he had a working version.

> IMHO this is not something that can be just fixed by changing the
> Refactoring Browser. The refactorings are implemented as "arbitrary"
> transformations/re-compositions of the AST. For a machine (e.g. the
> parser, the rewrite-engine, etc.), it is not clear if a space or a
> comment belongs to the AST node before or after.

Yes but gwenael managed that and he kept space and comments.
So of course this may be not the complete solution but if we do not
pay attention to increment then nothing will happen.

So when marcus is at lille I will ask them to sit together.

Stef




More information about the Pharo-dev mailing list