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

T.J. Richter tjrichter at live.com
Mon Sep 21 01:38:02 EDT 2009

Igor Stasenko <siguctua at ...> writes:

> FIY, i have implemented the smalltalk source tokenizer,
> which capturing everything, including whitespace.
> And, of course, i got the parser which works on top of that, which
> means, that potentially i could write a code which replacing
> a single token by different one , like #foo to #bar, while preserving
> the white space formatting, comments & everything else.

This sounds like it would be very useful. Renaming things is one of the most
common kinds of refactorings, and if it can be done automatically without users
having to worry about it altering surrounding code unnecessarily, that would be

Out of curiosity, is there some kind of global, RegExp-based search and replace
functionality in the system that can be used instead?

More information about the Pharo-dev mailing list