Hello, I'd like to get code rewritten automatically for a number of packages and classes. Basically I've got a bunch of packages and classes starting with a given prefix (like XXXThis and XXXThat) and I'd like to get them to be ZZZThis and ZZZThat.
Of course, I want all the source code to follow suit. I saw the option in the Nautilus menu, but that's quite obscure. I googled around and read the Flamel thing in the book but that didn't helped me. Clues? Phil |
I'm not sure how it works in modern Pharos as I think the class names were changed from Pharo 2.0 but in 1.4 you could do this to rename packages:
ORCategoryRegexRefactoring new replace: '^XXX-(.*)$' with: 'ZZZ-$1' ignoreCase: false; yourself and this for renaming classes: ORClassRegexRefactoring new "Example 1: Change class prefixes" renameClasses; replace: '^XXX(.*)$' with: 'ZZZ$1' ignoreCase: false; yourself. Hope this helps Paul
|
I used the RB prefixed versions but nothing happens. No replacement in my code. Matches are okay. Clues? Le 2 avr. 2014 06:02, "Paul DeBruicker" <[hidden email]> a écrit :
I'm not sure how it works in modern Pharos as I think the class names were |
In reply to this post by philippeback
RBClassRegexRefactoring new
renameClasses; replace: '^XX(.*)$' with: 'ZZ$1' ignoreCase: false; execute. cheers, Hernán 2014-04-01 16:59 GMT-03:00 [hidden email] <[hidden email]>: > Hello, > > I'd like to get code rewritten automatically for a number of packages and > classes. > > Basically I've got a bunch of packages and classes starting with a given > prefix (like XXXThis and XXXThat) and I'd like to get them to be ZZZThis and > ZZZThat. > > Of course, I want all the source code to follow suit. > > I saw the option in the Nautilus menu, but that's quite obscure. > > I googled around and read the Flamel thing in the book but that didn't > helped me. > > Clues? > > Phil > > |
Now I do have a ton of new symbols in autocompletion but no class has been renamed. 2.0 image... Le 2 avr. 2014 08:18, "Hernán Morales Durand" <[hidden email]> a écrit :
RBClassRegexRefactoring new |
2014-04-02 5:05 GMT-03:00 [hidden email] <[hidden email]>:
> Now I do have a ton of new symbols in autocompletion but no class has been > renamed. > > 2.0 image... > Works for me here in a clean 2.0 image. |
Free forum by Nabble | Edit this page |