119 |
119 |
120 versionMethods do:[:versionMethod | |
120 versionMethods do:[:versionMethod | |
121 |source| |
121 |source| |
122 |
122 |
123 source := versionMethod source. |
123 source := versionMethod source. |
124 (source isEmptyOrNil or:[(source startsWith:nonMeta nameOfVersionMethod) not]) ifTrue:[ |
124 (source isEmptyOrNil or:[(source startsWith:nonMeta nameOfOldVersionMethod) not]) ifTrue:[ |
125 "something bad happend to the classes code" |
125 "something bad happend to the classes code" |
126 |
126 |
127 Class fileOutErrorSignal |
127 Class fileOutErrorSignal |
128 raiseRequestWith:aClass |
128 raiseRequestWith:aClass |
129 errorString:' - bad source for version method (uncompiled class file?): ', (versionMethod displayString) |
129 errorString:' - bad source for version method (uncompiled class file?): ', (versionMethod displayString) |
292 |
292 |
293 |sortedSelectors first prevPrivacy privacy interestingMethods cat| |
293 |sortedSelectors first prevPrivacy privacy interestingMethods cat| |
294 |
294 |
295 interestingMethods := OrderedCollection new. |
295 interestingMethods := OrderedCollection new. |
296 aClass methodsDo:[:aMethod | |
296 aClass methodsDo:[:aMethod | |
297 |method wanted| |
297 |wanted| |
298 wanted := false. |
298 |
299 method := aMethod. |
299 (methodsAlreadySaved includes:aMethod) ifFalse:[ |
300 "Check all overridden methods as well" |
300 (aCategory = aMethod category) ifTrue:[ |
301 [ wanted not and:[method notNil]] |
301 (methodFilter isNil or:[methodFilter value:aMethod]) ifTrue:[ |
302 whileTrue:[ |
|
303 (methodsAlreadySaved includes:method) ifFalse:[ |
|
304 (aCategory = method category) ifTrue:[ |
|
305 (methodFilter isNil or:[methodFilter value:method]) ifTrue:[ |
|
306 skippedMethods notNil ifTrue:[ |
302 skippedMethods notNil ifTrue:[ |
307 wanted := (skippedMethods includesIdentical:method) not |
303 wanted := (skippedMethods includesIdentical:aMethod) not |
308 ] ifFalse:[ |
304 ] ifFalse:[ |
309 wanted := savedMethods isNil or:[ savedMethods includesIdentical:method ]. |
305 wanted := savedMethods isNil or:[ savedMethods includesIdentical:aMethod ]. |
310 ]. |
306 ]. |
311 wanted ifTrue:[ |
307 wanted ifTrue:[ |
312 "JV@2010-07-01: Changed to support selector/language namespaces" |
308 aMethod selector isSymbol ifTrue:[ |
313 "Namespaced methods are stored in class under string selector" |
309 interestingMethods add:aMethod |
314 (method selector isSymbol or:[method nameSpace notNil]) ifTrue:[ |
|
315 interestingMethods add:method |
|
316 ] ifFalse:[ |
310 ] ifFalse:[ |
317 Transcript showCR:'skipping non-symbol method ',method selector. |
311 Transcript showCR:'skipping non-symbol method ',aMethod selector. |
318 ]. |
312 ]. |
319 ]. |
313 ]. |
320 ] |
314 ] |
321 ] |
315 ] |
322 ]. |
316 ] |
323 method := method overriddenMethod. |
|
324 ]. |
|
325 ]. |
317 ]. |
326 interestingMethods notEmpty ifTrue:[ |
318 interestingMethods notEmpty ifTrue:[ |
327 first := true. |
319 first := true. |
328 prevPrivacy := nil. |
320 prevPrivacy := nil. |
329 |
321 |
367 aStream space. |
359 aStream space. |
368 aStream nextPutChunkSeparator. |
360 aStream nextPutChunkSeparator. |
369 aStream cr |
361 aStream cr |
370 ] |
362 ] |
371 |
363 |
372 "Modified: / 28-08-1995 / 14:30:41 / claus" |
364 "Modified: 28.8.1995 / 14:30:41 / claus" |
373 "Modified: / 15-11-1996 / 11:32:21 / cg" |
365 "Modified: 12.6.1996 / 11:37:33 / stefan" |
374 "Created: / 01-04-1997 / 16:04:33 / stefan" |
366 "Modified: 15.11.1996 / 11:32:21 / cg" |
375 "Modified: / 21-08-2009 / 23:57:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
367 "Created: 1.4.1997 / 16:04:33 / stefan" |
376 "Modified: / 01-07-2010 / 21:45:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
377 ! |
368 ! |
378 |
369 |
379 fileOutCategory:aCategory of:aClass methodFilter:methodFilter on:aStream |
370 fileOutCategory:aCategory of:aClass methodFilter:methodFilter on:aStream |
380 "file out all methods belonging to aCategory, aString onto aStream" |
371 "file out all methods belonging to aCategory, aString onto aStream" |
381 |
372 |