class: Tools::MethodRewriter
authorStefan Vogel <sv@exept.de>
Fri, 23 May 2014 10:09:07 +0200
changeset 14388 8f404d61e5c8
parent 14387 31d7d51ad25a
child 14389 fddd5fbbb8f4
class: Tools::MethodRewriter changed: #doRewrite: #methods (send #notEmptyOrNil instead of #notNil)
Tools__MethodRewriter.st
--- a/Tools__MethodRewriter.st	Fri May 23 00:16:24 2014 +0200
+++ b/Tools__MethodRewriter.st	Fri May 23 10:09:07 2014 +0200
@@ -678,11 +678,8 @@
                     with: self replacePattern;
                     executeTree: mth parseTree;
                     tree.
-        newSource := newTree source notNil
-                        ifTrue:[newTree source]
-                        ifFalse:[newTree formattedCode].
 
-        change := InteractiveAddMethodChange compile: newSource in:mth mclass classified:mth category.
+        change := InteractiveAddMethodChange compile: newTree newSource in:mth mclass classified:mth category.
 
         "/ collect in order to have only one change in the undo-list (instead of many)
         changes add: change.
@@ -1011,7 +1008,7 @@
 !
 
 methods
-    methods notNil ifTrue:[^ methods].
+    methods notEmptyOrNil ifTrue:[^ methods].
 
     ^self methodsFor: classes
 
@@ -1118,10 +1115,10 @@
 !MethodRewriter class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodRewriter.st,v 1.18 2014-02-05 18:57:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodRewriter.st,v 1.19 2014-05-23 08:09:07 stefan Exp $'
 !
 
 version_SVN
-    ^ '$Id: Tools__MethodRewriter.st,v 1.18 2014-02-05 18:57:30 cg Exp $'
+    ^ '$Id: Tools__MethodRewriter.st,v 1.19 2014-05-23 08:09:07 stefan Exp $'
 ! !