--- a/AbstractFileBrowser.st Wed Mar 17 17:18:17 2004 +0100
+++ b/AbstractFileBrowser.st Fri Mar 19 09:14:54 2004 +0100
@@ -5614,6 +5614,9 @@
SmalltalkInterchangeFileManager newForFileIn
fileName: fileName pathName;
fileIn.
+ ] ifFalse:[ (fileName hasSuffix:'js') ifTrue:[
+ "/ loading a javaScript file
+ JavaScriptSourceReader new fileIn:fileName.
] ifFalse:[ (fileName hasSuffix:'pcl') ifTrue:[
Parcel isNil ifTrue:[
Dialog warn:'Parcel support not loaded.'
@@ -5637,7 +5640,7 @@
aStream close
]
]
- ]]]
+ ]]]]
]]
].
!
@@ -6708,5 +6711,5 @@
!AbstractFileBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.222 2004-03-17 16:18:17 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.223 2004-03-19 08:13:57 ca Exp $'
! !
--- a/CodeGeneratorTool.st Wed Mar 17 17:18:17 2004 +0100
+++ b/CodeGeneratorTool.st Fri Mar 19 09:14:54 2004 +0100
@@ -1010,7 +1010,7 @@
"add documentation method containing doc template
but only if not already present."
- |userName loginName hostName emailAddress|
+ |userName loginName hostName emailAddress code|
(aClass includesSelector:#documentation) ifFalse:[
userName := OperatingSystem getFullUserName.
@@ -1018,7 +1018,28 @@
hostName := OperatingSystem getHostName.
emailAddress := loginName , '@' , hostName.
- self compile:
+ "/ ugly; should ask the class for that
+ aClass isJavaScriptClass ifTrue:[
+ code :=
+'function documentation() {
+/*
+' , (aClass theNonMetaclass comment ? ' documentation to be added.') , '
+
+ [author:]
+ ' , userName
+ , ' (' , emailAddress , ')' , '
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+*/
+}
+'
+ ] ifFalse:[
+ code:=
'documentation
"
' , (aClass theNonMetaclass comment ? ' documentation to be added.') , '
@@ -1034,8 +1055,13 @@
[see also:]
"
-' forClass:aClass
- inCategory:'documentation'.
+'
+ ].
+
+ self
+ compile:code
+ forClass:aClass
+ inCategory:'documentation'.
].
!
@@ -1195,14 +1221,20 @@
"add version method containing RCS template
but only if not already present and its not a private class."
+ |code|
+
aClass isPrivate ifFalse:[
(aClass includesSelector:#version) ifFalse:[
- self compile:
-'version
- ^ ''$' , 'Header$''
-'
- forClass:aClass
- inCategory:'documentation'.
+ "/ ugly; should ask the class for that
+ aClass isJavaScriptClass ifTrue:[
+ code:= ('function version() {\ return ("$' , 'Header$");\}') withCRs
+ ] ifFalse:[
+ code:= ('version\ ^ ''$' , 'Header$''') withCRs
+ ].
+ self
+ compile:code
+ forClass:aClass
+ inCategory:'documentation'.
]
].
! !
@@ -1307,5 +1339,5 @@
!CodeGeneratorTool class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.22 2004-02-09 13:25:02 martin Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.23 2004-03-19 08:14:54 ca Exp $'
! !
--- a/FileBrowser.st Wed Mar 17 17:18:17 2004 +0100
+++ b/FileBrowser.st Fri Mar 19 09:14:54 2004 +0100
@@ -2307,6 +2307,9 @@
SmalltalkInterchangeFileManager newForFileIn
fileName: path pathName;
fileIn.
+ ] ifFalse:[ (path hasSuffix:'js') ifTrue:[
+ "/ loading a javaScript file
+ JavaScriptSourceReader new fileIn:path.
] ifFalse:[ (path hasSuffix:'pcl') ifTrue:[
Parcel isNil ifTrue:[
self warn:'Parcel support not loaded.'
@@ -2328,7 +2331,7 @@
aStream close
]
]
- ]]]
+ ]]]]
]]
].
currentFileInFileName := prevCurrentFileName
@@ -7424,5 +7427,5 @@
!FileBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.589 2004-03-11 15:39:17 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.590 2004-03-19 08:14:07 ca Exp $'
! !