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

Lukas Renggli renggli at gmail.com
Sun Sep 20 03:16:34 EDT 2009

> 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

For details listen to what the original authors of the Refactoring
Browser say about code formatting:


Lukas Renggli

More information about the Pharo-dev mailing list