286 |
286 |
287 listOfAllSelectorsInCategory:aCategory ofClass:aClass |
287 listOfAllSelectorsInCategory:aCategory ofClass:aClass |
288 "answer a list of all selectors in a given method category |
288 "answer a list of all selectors in a given method category |
289 of the argument, aClass" |
289 of the argument, aClass" |
290 |
290 |
291 |newList searchCategory all| |
291 |newList searchCategory all p| |
292 |
292 |
293 all := (aCategory = '* all *'). |
293 all := (aCategory = '* all *'). |
294 (aCategory = '* no category *') ifTrue:[ |
294 (aCategory = '* no category *') ifTrue:[ |
295 searchCategory := nil |
295 searchCategory := nil |
296 ] ifFalse:[ |
296 ] ifFalse:[ |
300 aClass methodArray with:aClass selectorArray do:[:aMethod :selector | |
300 aClass methodArray with:aClass selectorArray do:[:aMethod :selector | |
301 |sel| |
301 |sel| |
302 |
302 |
303 (all or:[aMethod category = searchCategory]) ifTrue:[ |
303 (all or:[aMethod category = searchCategory]) ifTrue:[ |
304 sel := selector. |
304 sel := selector. |
305 aMethod isPrivate ifTrue:[ |
305 (p := aMethod privacy) ~~ #public ifTrue:[ |
306 sel := sel , ' (* private *)'. |
306 sel := sel , ' (* ' , p , ' *)'. |
307 ] ifFalse:[ |
|
308 aMethod isProtected ifTrue:[ |
|
309 sel := sel , ' (* protected *)'. |
|
310 ]. |
|
311 ]. |
307 ]. |
312 aMethod isWrapped ifTrue:[ |
308 aMethod isWrapped ifTrue:[ |
313 sel := sel , ' !!' |
309 sel := sel , ' !!' |
314 ]. |
310 ]. |
315 aMethod isInvalid ifTrue:[ |
311 aMethod isInvalid ifTrue:[ |
4095 actualClass removeSelector:(actualClass selectorAtMethod:currentMethod). |
4091 actualClass removeSelector:(actualClass selectorAtMethod:currentMethod). |
4096 currentMethod := currentSelector := nil. |
4092 currentMethod := currentSelector := nil. |
4097 self updateMethodListWithScroll:false |
4093 self updateMethodListWithScroll:false |
4098 ! |
4094 ! |
4099 |
4095 |
|
4096 methodPrivacy:how |
|
4097 "change the current methods privacy. |
|
4098 EXPERIMENTAL" |
|
4099 |
|
4100 self checkMethodSelected ifFalse:[^ self]. |
|
4101 currentMethod isPublic ifFalse:[ |
|
4102 currentMethod privacy:how. |
|
4103 actualClass addChangeRecordForMethodPrivacy:currentMethod. |
|
4104 self updateMethodListWithScroll:false keepSelection:true. |
|
4105 ] |
|
4106 ! |
|
4107 |
4100 methodMakePublic |
4108 methodMakePublic |
4101 "make the current method public. |
4109 "make the current method public. |
4102 EXPERIMENTAL" |
4110 EXPERIMENTAL" |
4103 |
4111 |
4104 self checkMethodSelected ifFalse:[^ self]. |
4112 self methodPrivacy:#public |
4105 currentMethod isPublic ifFalse:[ |
|
4106 currentMethod setToPublic. |
|
4107 Class addChangeRecordForMethodPrivacy:currentMethod. |
|
4108 self updateMethodListWithScroll:false keepSelection:true. |
|
4109 ObjectMemory flushCaches |
|
4110 ] |
|
4111 |
|
4112 "Modified: 27.8.1995 / 23:01:07 / claus" |
|
4113 ! |
4113 ! |
4114 |
4114 |
4115 methodMakeProtected |
4115 methodMakeProtected |
4116 "make the current method protected. |
4116 "make the current method protected. |
4117 EXPERIMENTAL" |
4117 EXPERIMENTAL" |
4118 |
4118 |
4119 self checkMethodSelected ifFalse:[^ self]. |
4119 self methodPrivacy:#protected |
4120 currentMethod isProtected ifFalse:[ |
|
4121 currentMethod setToProtected. |
|
4122 Class addChangeRecordForMethodPrivacy:currentMethod. |
|
4123 self updateMethodListWithScroll:false keepSelection:true. |
|
4124 ObjectMemory flushCaches |
|
4125 ] |
|
4126 |
|
4127 "Modified: 27.8.1995 / 23:01:03 / claus" |
|
4128 ! |
4120 ! |
4129 |
4121 |
4130 methodMakePrivate |
4122 methodMakePrivate |
4131 "make the current method private. |
4123 "make the current method private. |
4132 EXPERIMENTAL" |
4124 EXPERIMENTAL" |
4133 |
4125 |
4134 self checkMethodSelected ifFalse:[^ self]. |
4126 self methodPrivacy:#private |
4135 currentMethod isPrivate ifFalse:[ |
|
4136 currentMethod setToPrivate. |
|
4137 Class addChangeRecordForMethodPrivacy:currentMethod. |
|
4138 self updateMethodListWithScroll:false keepSelection:true. |
|
4139 ObjectMemory flushCaches |
|
4140 ] |
|
4141 |
|
4142 "Modified: 27.8.1995 / 23:00:57 / claus" |
|
4143 ! |
4127 ! |
4144 |
4128 |
4145 methodSenders |
4129 methodSenders |
4146 "launch an enterBox for selector to search for" |
4130 "launch an enterBox for selector to search for" |
4147 |
4131 |