Nice :)

That is funny because I am currently doing something similar. I need to
recompile all the methods of all classes of a package to change a word in
the methods.
I have 237 classes and a hell lot of methods in each :p

So I did :

(RPackageOrganizer default packageNamed: 'MyPackage') definedClasses do: [
:each1 |
    each1 methods do: [ :each2 |
        each1 compile: (each2 sourceCode copyReplaceAll: 'OldWord' with:
'NewWord' asTokens: true).
    ].
].

Apparently it worked too !

But now my problem is I have about 200 words to replace every time so I
need a third iteration.

2015-06-03 8:34 GMT+02:00 stepharo <[email protected]>:

> Hi
>
> I would like to do the following: recompile the method category into a
> method name group without removing for now the method category. I have to
> do that 125 times :)
>
> so I did
>
>      RBLintRule
>         addSelector: #group
>         withMethod: ((RBLintRule methodDictionary at: #category) ast
> selector: #group; generate)
>
> and it worked :)
> At least I believe.
>
> Great system
>
>
>

Reply via email to