Recently I wanted to replace all method sends of oldMessage to newMessage in a specific method category in a class, then I wrote this little script I want to share with you: | className realClass replacer category | className := #MyClass. realClass := Smalltalk at: className. category := #accessing. replacer := RBParseTreeRewriter new replace: '`receiver oldMessage' with: '`receiver newMessage'; yourself. (realClass organization listAtCategoryNamed: category) collect: [:sel | | parseTree | parseTree := ( realClass >> sel) parseTree. (replacer executeTree: parseTree) ifTrue: [ realClass compile: replacer tree newSource " [1] " ] ] Now some questions: 1) In [1] "( RBClass existingNamed: className ) compileTree: replacer tree" would be more appropiate? I get a MNU when evaluated with latest AST/Refactoring. 2) The above script have some problems, if you want to get replaced 'this is a string' asString. to 'this is a string' asText it won't match. The same happens with: " self model asString " and other patterns. How to modify the rewriter to match oldMessage/newMessage at any point? i.e. [: tmp | anObject1 blabla1 blabla2 oldMessage blabla3 ] Thanks in advance, -- Hernán Morales Information Technology Manager, Institute of Veterinary Genetics. National Scientific and Technical Research Council (CONICET). La Plata (1900), Buenos Aires, Argentina. Telephone: +54 (0221) 421-1799. Internal: 422 Fax: 425-7980 or 421-1799.