rename a symbol

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

rename a symbol

SeanTAllen
is there a way to do a refactoring that takes all instances of a
symbol and renames them?

So if I had a symbol #Foo in a method, rename it and all other uses of
#Foo to #Bar.

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

Re: rename a symbol

Lukas Renggli
> is there a way to do a refactoring that takes all instances of a
> symbol and renames them?
>
> So if I had a symbol #Foo in a method, rename it and all other uses of
> #Foo to #Bar.


The menu "refactor | rewrite code" and

     RBParseTreeRewriter new
            replace: '#Foo' with: '#Bar';
            yourself

does a parser tree replacement.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

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