SmalltalkCodeGeneratorTool.st
changeset 12712 b412eb74759b
parent 12458 ea3f2adb406f
child 12807 ba8c5416aa28
child 12879 a544ab64abc0
equal deleted inserted replaced
12711:e970bedfb0af 12712:b412eb74759b
  1430                         ifFalse:[
  1430                         ifFalse:[
  1431                             (aClass isMeta ifTrue:['classInstVar'] ifFalse:['instance'])].
  1431                             (aClass isMeta ifTrue:['classInstVar'] ifFalse:['instance'])].
  1432 
  1432 
  1433         methodNameBase := name asUppercaseFirst.
  1433         methodNameBase := name asUppercaseFirst.
  1434         (methodNameBase endsWith:'s') ifTrue:[
  1434         (methodNameBase endsWith:'s') ifTrue:[
  1435             methodNameBase := methodNameBase copyWithoutLast:1.
  1435             methodNameBase := methodNameBase copyButLast:1.
  1436         ].
  1436         ].
  1437         methodName := 'add' , methodNameBase, ':'. 
  1437         methodName := 'add' , methodNameBase, ':'. 
  1438 
  1438 
  1439         "check, if method is not already present"
  1439         "check, if method is not already present"
  1440         (aClass includesSelector:(methodName asSymbol)) ifFalse:[
  1440         (aClass includesSelector:(methodName asSymbol)) ifFalse:[
  1506         holderMethodName := name.
  1506         holderMethodName := name.
  1507         name isUppercaseFirst ifTrue:[
  1507         name isUppercaseFirst ifTrue:[
  1508             holderMethodName := holderMethodName asLowercaseFirst. 
  1508             holderMethodName := holderMethodName asLowercaseFirst. 
  1509         ].
  1509         ].
  1510         (holderMethodName endsWith:'Holder') ifTrue:[
  1510         (holderMethodName endsWith:'Holder') ifTrue:[
  1511             methodName := holderMethodName copyWithoutLast:6.
  1511             methodName := holderMethodName copyButLast:6.
  1512         ] ifFalse:[
  1512         ] ifFalse:[
  1513             methodName := holderMethodName.
  1513             methodName := holderMethodName.
  1514             holderMethodName := methodName , 'Holder'.
  1514             holderMethodName := methodName , 'Holder'.
  1515         ].
  1515         ].
  1516 
  1516 
  2527 ! !
  2527 ! !
  2528 
  2528 
  2529 !SmalltalkCodeGeneratorTool class methodsFor:'documentation'!
  2529 !SmalltalkCodeGeneratorTool class methodsFor:'documentation'!
  2530 
  2530 
  2531 version
  2531 version
  2532     ^ '$Header: /cvs/stx/stx/libtool/SmalltalkCodeGeneratorTool.st,v 1.19 2013-03-11 20:34:41 cg Exp $'
  2532     ^ '$Header: /cvs/stx/stx/libtool/SmalltalkCodeGeneratorTool.st,v 1.20 2013-04-25 13:11:09 stefan Exp $'
  2533 !
  2533 !
  2534 
  2534 
  2535 version_CVS
  2535 version_CVS
  2536     ^ '$Header: /cvs/stx/stx/libtool/SmalltalkCodeGeneratorTool.st,v 1.19 2013-03-11 20:34:41 cg Exp $'
  2536     ^ '$Header: /cvs/stx/stx/libtool/SmalltalkCodeGeneratorTool.st,v 1.20 2013-04-25 13:11:09 stefan Exp $'
  2537 !
  2537 !
  2538 
  2538 
  2539 version_SVN
  2539 version_SVN
  2540     ^ '§Id§'
  2540     ^ '§Id§'
  2541 ! !
  2541 ! !