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 |