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 'From Smalltalk/X, Version:3.2.1 on 14-oct-1997 at 11:17:15 pm' ! |
12 |
14 |
13 Object subclass:#ClassCategoryReader |
15 Object subclass:#ClassCategoryReader |
14 instanceVariableNames:'myClass myCategory privacy ignore primSpec' |
16 instanceVariableNames:'myClass myCategory privacy ignore primSpec' |
15 classVariableNames:'KeepSource SourceMode SkipUnchangedMethods' |
17 classVariableNames:'KeepSource SourceMode SkipUnchangedMethods' |
16 poolDictionaries:'' |
18 poolDictionaries:'' |
184 "read method-chunks from the input stream, aStream; compile them |
186 "read method-chunks from the input stream, aStream; compile them |
185 and add the methods to the class defined by the class-instance var; |
187 and add the methods to the class defined by the class-instance var; |
186 errors and notifications are passed to requestor. |
188 errors and notifications are passed to requestor. |
187 If passChunk is true, chunks are given to the requestor, |
189 If passChunk is true, chunks are given to the requestor, |
188 via a #source: message, allowing it to open a view showing any |
190 via a #source: message, allowing it to open a view showing any |
189 arronous source code. |
191 erronous source code. |
190 If oneChunkOnly is true, the fileIn is finished after the first chunk." |
192 If oneChunkOnly is true, the fileIn is finished after the first chunk." |
191 |
193 |
192 |aString done method compiler canMakeSourceRef sourceFile pos nm src s| |
194 |aString done method compiler canMakeSourceRef sourceFile pos nm src s| |
193 |
195 |
194 Smalltalk silentLoading == true ifFalse:[ |
196 Smalltalk silentLoading == true ifFalse:[ |
221 aStream isFileStream ifTrue:[ |
223 aStream isFileStream ifTrue:[ |
222 sourceFile := aStream pathName. |
224 sourceFile := aStream pathName. |
223 "/ |
225 "/ |
224 "/ only do it, if the sourceFiles name |
226 "/ only do it, if the sourceFiles name |
225 "/ ends with '.st' |
227 "/ ends with '.st' |
226 "/ this prevents methods to reference the changes file. |
228 "/ this prevents methods from referencing the changes file. |
227 "/ |
229 "/ |
228 (sourceFile endsWith:'.st') ifTrue:[ |
230 (sourceFile asFilename hasSuffix:'st') ifTrue:[ |
229 canMakeSourceRef := true. |
231 canMakeSourceRef := true. |
230 |
232 |
231 SourceMode == #absReference ifFalse:[ |
233 SourceMode == #absReference ifFalse:[ |
232 SourceMode == #sourceReference ifTrue:[ |
234 SourceMode == #sourceReference ifTrue:[ |
233 sourceFile := 'st.src'. |
235 sourceFile := 'st.src'. |
245 done ifFalse:[ |
247 done ifFalse:[ |
246 canMakeSourceRef ifTrue:[ |
248 canMakeSourceRef ifTrue:[ |
247 pos := aStream position |
249 pos := aStream position |
248 ]. |
250 ]. |
249 aString := aStream nextChunk. |
251 aString := aStream nextChunk. |
250 done := aString isNil or:[aString isEmpty]. |
252 done := aString size == 0. |
251 done ifFalse:[ |
253 done ifFalse:[ |
252 primSpec notNil ifTrue:[ |
254 primSpec notNil ifTrue:[ |
253 ignore ifFalse:[ |
255 ignore ifFalse:[ |
254 myClass perform:primSpec with:aString. |
256 myClass perform:primSpec with:aString. |
255 " |
257 " |
328 ] |
330 ] |
329 ] |
331 ] |
330 |
332 |
331 "Modified: 9.9.1995 / 15:29:08 / claus" |
333 "Modified: 9.9.1995 / 15:29:08 / claus" |
332 "Created: 5.9.1996 / 17:45:45 / cg" |
334 "Created: 5.9.1996 / 17:45:45 / cg" |
333 "Modified: 14.2.1997 / 18:27:15 / cg" |
335 "Modified: 14.10.1997 / 16:15:38 / cg" |
334 ! ! |
336 ! ! |
335 |
337 |
336 !ClassCategoryReader methodsFor:'private'! |
338 !ClassCategoryReader methodsFor:'private'! |
337 |
339 |
338 class:aClass category:aCategory |
340 class:aClass category:aCategory |
368 ! ! |
370 ! ! |
369 |
371 |
370 !ClassCategoryReader class methodsFor:'documentation'! |
372 !ClassCategoryReader class methodsFor:'documentation'! |
371 |
373 |
372 version |
374 version |
373 ^ '$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.34 1997-02-14 17:28:58 cg Exp $' |
375 ^ '$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.35 1997-10-15 12:30:30 cg Exp $' |
374 ! ! |
376 ! ! |
375 ClassCategoryReader initialize! |
377 ClassCategoryReader initialize! |