194 (i := DefaultIcon) isNil ifTrue:[ |
194 (i := DefaultIcon) isNil ifTrue:[ |
195 resources := self classResources. |
195 resources := self classResources. |
196 i := resources at:'SYSTEMBROWSER_ICON' default:nil. |
196 i := resources at:'SYSTEMBROWSER_ICON' default:nil. |
197 i isNil ifTrue:[ |
197 i isNil ifTrue:[ |
198 nm := resources at:'SYSTEMBROWSER_ICON_FILE' default:'SBrowser.xbm'. |
198 nm := resources at:'SYSTEMBROWSER_ICON_FILE' default:'SBrowser.xbm'. |
199 i := Smalltalk bitmapFromFileNamed:nm inPackage:#'stx:libtool'. |
199 i := Smalltalk imageFromFileNamed:nm inPackage:#'stx:libtool'. |
200 i isNil ifTrue:[ |
200 i isNil ifTrue:[ |
201 i := StandardSystemView defaultIcon |
201 i := StandardSystemView defaultIcon |
202 ] |
202 ] |
203 ]. |
203 ]. |
204 i notNil ifTrue:[ |
204 i notNil ifTrue:[ |
8357 "show number of methods to remove and query user" |
8357 "show number of methods to remove and query user" |
8358 |
8358 |
8359 |t box sels count answer| |
8359 |t box sels count answer| |
8360 |
8360 |
8361 currentMethodCategory notNil ifTrue:[ |
8361 currentMethodCategory notNil ifTrue:[ |
8362 sels := OrderedCollection new. |
8362 sels := OrderedCollection new. |
8363 actualClass methodDictionary keysAndValuesDo:[:selector :aMethod | |
8363 actualClass methodDictionary keysAndValuesDo:[:selector :aMethod | |
8364 (aMethod category = currentMethodCategory) ifTrue:[ |
8364 (aMethod category = currentMethodCategory) ifTrue:[ |
8365 sels add:selector |
8365 sels add:selector |
8366 ] |
8366 ] |
8367 ]. |
8367 ]. |
8368 count := sels size. |
8368 count := sels size. |
8369 (count ~~ 0) ifTrue:[ |
8369 (count ~~ 0) ifTrue:[ |
8370 (count == 1) ifTrue:[ |
8370 (count == 1) ifTrue:[ |
8371 t := 'remove %1\(with 1 method) ?' |
8371 t := 'remove the method in category ''%1'' ?' |
8372 ] ifFalse:[ |
8372 ] ifFalse:[ |
8373 t := 'remove %1\(with %2 methods) ?' |
8373 t := 'remove all %2 methods in category ''%1'' ?' |
8374 ]. |
8374 ]. |
8375 t := resources string:t with:currentMethodCategory with:count printString. |
8375 t := resources string:t with:currentMethodCategory with:count printString. |
8376 t := t withCRs. |
8376 t := t withCRs. |
8377 |
8377 |
8378 box := YesNoBox |
8378 box := YesNoBox |
8379 title:t |
8379 title:t |
8380 yesText:(resources at:'remove') |
8380 yesText:(resources at:'remove') |
8381 noText:(resources at:'abort'). |
8381 noText:(resources at:'abort'). |
8382 answer := box confirm. |
8382 answer := box confirm. |
8383 box destroy. |
8383 box destroy. |
8384 answer ifFalse:[ |
8384 answer ifFalse:[ |
8385 ^ self. |
8385 ^ self. |
8386 ]. |
8386 ]. |
8387 sels do:[:selector| |
8387 sels do:[:selector| |
8388 actualClass removeSelector:selector. |
8388 actualClass removeSelector:selector. |
8389 ]. |
8389 ]. |
8390 ]. |
8390 ]. |
8391 currentMethodCategory := nil. |
8391 currentMethodCategory := nil. |
8392 self releaseMethod. |
8392 self releaseMethod. |
8393 self updateMethodCategoryListWithScroll:false. |
8393 self updateMethodCategoryListWithScroll:false. |
8394 self updateMethodList |
8394 self updateMethodList |
8395 ] |
8395 ] |
8396 |
8396 |
8397 "Modified: / 7.6.1996 / 09:13:15 / stefan" |
8397 "Modified: / 7.6.1996 / 09:13:15 / stefan" |
8398 "Modified: / 27.7.1998 / 10:58:00 / cg" |
8398 "Modified: / 27.7.1998 / 10:58:00 / cg" |
8399 ! |
8399 ! |