SystemBrowser.st
changeset 9685 629e1d789a2d
parent 9660 e8b452501452
child 9879 5109d9da29eb
equal deleted inserted replaced
9684:8c83477f6688 9685:629e1d789a2d
  2958                         top20 add:eachSelector.
  2958                         top20 add:eachSelector.
  2959                         top20 size > 20 ifTrue:[ top20 removeLast. allSelectors := top20 asSet ].
  2959                         top20 size > 20 ifTrue:[ top20 removeLast. allSelectors := top20 asSet ].
  2960                     ]
  2960                     ]
  2961                 ]
  2961                 ]
  2962             ].
  2962             ].
       
  2963             top20 isEmpty ifTrue:[
       
  2964                 |lcSelector|
       
  2965 
       
  2966                 lcSelector := aSelectorString asLowercase.
       
  2967                 Smalltalk allMethodsWithSelectorDo:[:eachMethod :eachSelector |
       
  2968                     (eachSelector asLowercase spellAgainst:lcSelector) > 50 ifTrue:[    
       
  2969                         (allSelectors includes:eachSelector) ifFalse:[
       
  2970                             allSelectors add:eachSelector.
       
  2971                             top20 add:eachSelector.
       
  2972                             top20 size > 20 ifTrue:[ top20 removeLast. allSelectors := top20 asSet ].
       
  2973                         ]
       
  2974                     ]
       
  2975                 ].
       
  2976             ].
       
  2977 
  2963             choice := Dialog 
  2978             choice := Dialog 
  2964                 choose:(title,' - none found.\\Browse implementors of a similar selector or cancel:' withCRs)
  2979                 choose:(title,' - none found.\\Browse implementors of a similar selector or cancel:' withCRs)
  2965                 fromList:top20 
  2980                 fromList:top20 
  2966                 lines:10.
  2981                 lines:10.
  2967             choice notEmptyOrNil ifTrue:[
  2982             choice notEmptyOrNil ifTrue:[
  2996                                                with:Float
  3011                                                with:Float
  2997                                                with:SmallInteger)
  3012                                                with:SmallInteger)
  2998                                   title:'some implementors of +'
  3013                                   title:'some implementors of +'
  2999     "
  3014     "
  3000 
  3015 
  3001     "Modified: / 4.9.1995 / 17:33:39 / claus"
  3016     "Modified: / 04-09-1995 / 17:33:39 / claus"
  3002     "Modified: / 19.6.1996 / 14:19:02 / stefan"
  3017     "Modified: / 19-06-1996 / 14:19:02 / stefan"
  3003     "Modified: / 5.11.2001 / 17:30:38 / cg"
  3018     "Modified: / 15-01-2011 / 14:35:56 / cg"
  3004 !
  3019 !
  3005 
  3020 
  3006 browseImplementorsOf:aSelectorString in:aCollectionOfClasses title:title
  3021 browseImplementorsOf:aSelectorString in:aCollectionOfClasses title:title
  3007     "launch a browser for all implementors of aSelector in
  3022     "launch a browser for all implementors of aSelector in
  3008      the classes contained in aCollectionOfClasses and its metaclasses"
  3023      the classes contained in aCollectionOfClasses and its metaclasses"
  5708 ! !
  5723 ! !
  5709 
  5724 
  5710 !SystemBrowser class methodsFor:'documentation'!
  5725 !SystemBrowser class methodsFor:'documentation'!
  5711 
  5726 
  5712 version
  5727 version
  5713     ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.286 2010-12-08 11:20:37 cg Exp $'
  5728     ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.287 2011-01-15 13:37:23 cg Exp $'
  5714 !
  5729 !
  5715 
  5730 
  5716 version_CVS
  5731 version_CVS
  5717     ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.286 2010-12-08 11:20:37 cg Exp $'
  5732     ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.287 2011-01-15 13:37:23 cg Exp $'
  5718 ! !
  5733 ! !
  5719 
  5734 
  5720 SystemBrowser initialize!
  5735 SystemBrowser initialize!