equal
deleted
inserted
replaced
7 inclusion of the above copyright notice. This software may not |
7 inclusion of the above copyright notice. This software may not |
8 be provided or otherwise made available to, or used by, any |
8 be provided or otherwise made available to, or used by, any |
9 other person. No title to or ownership of the software is |
9 other person. No title to or ownership of the software is |
10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
12 |
|
13 "{ Package: 'stx:libbasic' }" |
12 "{ Package: 'stx:libbasic' }" |
14 |
13 |
15 Object subclass:#SmalltalkChunkFileSourceWriter |
14 Object subclass:#SmalltalkChunkFileSourceWriter |
16 instanceVariableNames:'classBeingSaved' |
15 instanceVariableNames:'classBeingSaved' |
17 classVariableNames:'' |
16 classVariableNames:'' |
76 (copyrightMethod := meta compiledMethodAt:#copyright) notNil ifTrue:[ |
75 (copyrightMethod := meta compiledMethodAt:#copyright) notNil ifTrue:[ |
77 " |
76 " |
78 get the copyright methods source, |
77 get the copyright methods source, |
79 and insert at beginning. |
78 and insert at beginning. |
80 " |
79 " |
81 copyrightText := copyrightMethod source. |
80 copyrightText := copyrightMethod comment. |
82 copyrightText isNil ifTrue:[ |
81 copyrightText isEmptyOrNil ifTrue:[ |
83 " |
82 " |
84 no source available - trigger an error |
83 no source available - trigger an error |
85 " |
84 " |
86 ClassDescription fileOutErrorSignal |
85 ClassDescription fileOutErrorSignal |
87 raiseRequestWith:nonMeta |
86 raiseRequestWith:nonMeta |
90 ]. |
89 ]. |
91 " |
90 " |
92 strip off the selector-line |
91 strip off the selector-line |
93 " |
92 " |
94 copyrightText := copyrightText asCollectionOfLines asStringCollection. |
93 copyrightText := copyrightText asCollectionOfLines asStringCollection. |
95 copyrightText := copyrightText copyFrom:2 to:(copyrightText size). |
94 [copyrightText notEmpty and:[copyrightText first isEmptyOrNil]] whileTrue:[ copyrightText removeFirst ]. |
96 "/ copyrightText do:[:line | outStream nextPutAll:line. aStream cr.]. |
95 [copyrightText notEmpty and:[copyrightText last isEmptyOrNil]] whileTrue:[ copyrightText removeLast ]. |
97 copyrightText := copyrightText asString. |
96 copyrightText notEmptyOrNil ifTrue:[ |
98 outStream nextPutAllAsChunk:copyrightText. |
97 copyrightText addFirst:'"'. |
|
98 copyrightText addLast:'"'. |
|
99 copyrightText := copyrightText asString. |
|
100 outStream nextPutAllAsChunk:copyrightText. |
|
101 ]. |
99 ]. |
102 ]. |
100 |
103 |
101 stampIt ifTrue:[ |
104 stampIt ifTrue:[ |
102 "/ |
105 "/ |
103 "/ first, a timestamp |
106 "/ first, a timestamp |
219 outStream cr. |
222 outStream cr. |
220 ]. |
223 ]. |
221 ]. |
224 ]. |
222 ] |
225 ] |
223 |
226 |
224 "Created: / 15.11.1995 / 12:53:06 / cg" |
227 "Created: / 15-11-1995 / 12:53:06 / cg" |
225 "Modified: / 1.4.1997 / 16:01:05 / stefan" |
228 "Modified: / 01-04-1997 / 16:01:05 / stefan" |
226 "Modified: / 13.3.1998 / 12:23:59 / cg" |
229 "Modified: / 04-10-2006 / 17:22:44 / cg" |
227 ! |
230 ! |
228 |
231 |
229 fileOutAllDefinitionsOf:aNonMetaClass on:aStream |
232 fileOutAllDefinitionsOf:aNonMetaClass on:aStream |
230 "append expressions on aStream, which defines myself and all of my private classes." |
233 "append expressions on aStream, which defines myself and all of my private classes." |
231 |
234 |
381 ! ! |
384 ! ! |
382 |
385 |
383 !SmalltalkChunkFileSourceWriter class methodsFor:'documentation'! |
386 !SmalltalkChunkFileSourceWriter class methodsFor:'documentation'! |
384 |
387 |
385 version |
388 version |
386 ^ '$Header: /cvs/stx/stx/libbasic/SmalltalkChunkFileSourceWriter.st,v 1.2 2005-02-02 11:03:03 cg Exp $' |
389 ^ '$Header: /cvs/stx/stx/libbasic/SmalltalkChunkFileSourceWriter.st,v 1.3 2006-10-04 15:27:53 cg Exp $' |
387 ! ! |
390 ! ! |