changed: #codeFor_shouldImplementFor:inClass:
authorClaus Gittinger <cg@exept.de>
Thu, 22 Oct 2009 14:23:12 +0200
changeset 9028 56eb45cb11f3
parent 9027 f2edc1bca4de
child 9029 66a3d6c4030e
changed: #codeFor_shouldImplementFor:inClass:
CodeGeneratorTool.st
--- a/CodeGeneratorTool.st	Thu Oct 22 14:07:36 2009 +0200
+++ b/CodeGeneratorTool.st	Thu Oct 22 14:23:12 2009 +0200
@@ -2812,9 +2812,12 @@
 codeFor_shouldImplementFor:selector inClass:aClass
     |mthd comment implClass methodBodyStream searcher errorMessageString|
 
-    implClass := aClass superclass whichClassImplements:selector.
+    (aClass notNil
+    and:[ aClass superclass notNil ]) ifTrue:[
+        implClass := aClass superclass whichClassImplements:selector.
+    ].
     implClass isNil ifTrue:[
-        ^ (selector,'\    ^ self shouldImplement\') withCRs
+        ^ ((Method methodDefinitionTemplateForSelector:selector),'\    ^ self shouldImplement\') withCRs
     ].
 
     mthd := implClass compiledMethodAt:selector.
@@ -2828,7 +2831,7 @@
     comment := mthd methodComment.
     comment isEmptyOrNil ifTrue:[
         methodBodyStream 
-            nextPutAll:('Superclass <1s> says that I am responsible to implement this method'  
+            nextPutAll:('superclass <1s> says that I am responsible to implement this method'  
                         expandMacrosWith:implClass name)
     ] ifFalse:[
         comment asStringCollection do:[:eachLine|
@@ -2890,9 +2893,9 @@
 !CodeGeneratorTool class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.67 2009-10-22 12:07:36 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.68 2009-10-22 12:23:12 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.67 2009-10-22 12:07:36 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.68 2009-10-22 12:23:12 cg Exp $'
 ! !