--- a/CodeGeneratorTool.st Wed Nov 11 12:33:03 2009 +0100
+++ b/CodeGeneratorTool.st Wed Nov 11 12:46:32 2009 +0100
@@ -2484,10 +2484,18 @@
createInstanceCreationMethodWithSetupFor:selector category:category in:aMetaClass
"add an inst-creation method"
- |template|
+ |template instMthd argNames|
(aMetaClass includesSelector:selector) ifFalse:[
- template := Parser methodSpecificationForSelector:selector.
+ instMthd := aMetaClass theNonMetaclass compiledMethodAt:selector.
+ (instMthd notNil
+ and:[ (argNames := instMthd methodArgNames) notEmptyOrNil ])
+ ifTrue:[
+ template := Parser methodSpecificationForSelector:selector argNames:argNames.
+ ] ifFalse:[
+ template := Parser methodSpecificationForSelector:selector.
+ ].
+
self
compile:
template , '
@@ -3153,9 +3161,9 @@
!CodeGeneratorTool class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.79 2009-11-10 19:40:12 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.80 2009-11-11 11:46:32 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.79 2009-11-10 19:40:12 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.80 2009-11-11 11:46:32 cg Exp $'
! !