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 philippeback wrote
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
-- View this message in context: http://forum.world.st/Rewiting-code-doc-tp4752146p4752162.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I used the RB prefixed versions but nothing happens. No replacement in my code. Matches are okay. Clues? Phil Le 2 avr. 2014 06:02, "Paul DeBruicker" <pdebruic@gmail.com> a écrit :
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
philippeback wrote
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
-- View this message in context: http://forum.world.st/Rewiting-code-doc-tp4752146p4752162.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
RBClassRegexRefactoring new renameClasses; replace: '^XX(.*)$' with: 'ZZ$1' ignoreCase: false; execute. cheers, Hernán 2014-04-01 16:59 GMT-03:00 phil@highoctane.be <phil@highoctane.be>:
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" <hernan.morales@gmail.com> a écrit :
RBClassRegexRefactoring new renameClasses; replace: '^XX(.*)$' with: 'ZZ$1' ignoreCase: false; execute.
cheers,
Hernán
2014-04-01 16:59 GMT-03:00 phil@highoctane.be <phil@highoctane.be>:
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
participants (3)
-
Hernán Morales Durand -
Paul DeBruicker -
phil@highoctane.be