SmalltalkCodeGeneratorTool.st
changeset 11759 475918fd2d85
parent 11640 9308a03c98a2
child 11841 8df2e8a1dc3e
equal deleted inserted replaced
11758:531b78e53e8f 11759:475918fd2d85
  1880     ]
  1880     ]
  1881 !
  1881 !
  1882 
  1882 
  1883 createVersionMethodFor:aClass
  1883 createVersionMethodFor:aClass
  1884     <resource: #obsolete>
  1884     <resource: #obsolete>
  1885     "add version method containing RCS template
  1885     "add a version method containing RCS template
  1886      but only if not already present and its not a private class."
  1886      but only if not already present and it's not a private class."
  1887 
  1887 
  1888     |code|
  1888     |code|
  1889 
  1889 
  1890     self obsoleteMethodWarning.
  1890     self obsoleteMethodWarning.
  1891 
  1891 
  1892     aClass isPrivate ifFalse:[
  1892     aClass isPrivate ifFalse:[
  1893         (aClass includesSelector:#version) ifFalse:[
  1893         (aClass includesSelector:#version) ifFalse:[
  1894             "/ ugly; should ask the class for that    
  1894             code := aClass programmingLanguage versionMethodTemplateForCVS.
  1895             aClass isJavaScriptClass ifTrue:[
       
  1896                 code:= ('function version() {\    return ("$' , 'Header$");\}') withCRs
       
  1897             ] ifFalse:[
       
  1898                 code:= ('version\    ^ ''$' , 'Header$''') withCRs
       
  1899             ].
       
  1900             self 
  1895             self 
  1901                 compile:code
  1896                 compile:code
  1902                 forClass:aClass 
  1897                 forClass:aClass 
  1903                 inCategory:#documentation.
  1898                 inCategory:#documentation.
  1904         ]
  1899         ]
  1905     ].
  1900     ].
       
  1901 
       
  1902     "Modified (comment): / 21-08-2012 / 11:54:57 / cg"
  1906 ! !
  1903 ! !
  1907 
  1904 
  1908 !SmalltalkCodeGeneratorTool methodsFor:'code templates'!
  1905 !SmalltalkCodeGeneratorTool methodsFor:'code templates'!
  1909 
  1906 
  1910 anyApplicationClassInProjectOf:aClass
  1907 anyApplicationClassInProjectOf:aClass
  2491 ! !
  2488 ! !
  2492 
  2489 
  2493 !SmalltalkCodeGeneratorTool class methodsFor:'documentation'!
  2490 !SmalltalkCodeGeneratorTool class methodsFor:'documentation'!
  2494 
  2491 
  2495 version
  2492 version
  2496     ^ '$Header: /cvs/stx/stx/libtool/SmalltalkCodeGeneratorTool.st,v 1.15 2012-07-20 18:13:34 cg Exp $'
  2493     ^ '$Header: /cvs/stx/stx/libtool/SmalltalkCodeGeneratorTool.st,v 1.16 2012-08-21 10:28:31 cg Exp $'
  2497 !
  2494 !
  2498 
  2495 
  2499 version_CVS
  2496 version_CVS
  2500     ^ '$Header: /cvs/stx/stx/libtool/SmalltalkCodeGeneratorTool.st,v 1.15 2012-07-20 18:13:34 cg Exp $'
  2497     ^ '$Header: /cvs/stx/stx/libtool/SmalltalkCodeGeneratorTool.st,v 1.16 2012-08-21 10:28:31 cg Exp $'
  2501 !
  2498 !
  2502 
  2499 
  2503 version_SVN
  2500 version_SVN
  2504     ^ '§Id§'
  2501     ^ '§Id§'
  2505 ! !
  2502 ! !