SystemBrowser.st
changeset 2409 656eeb7197fa
parent 2398 8cefc3c21f40
child 2412 5d341024ea25
equal deleted inserted replaced
2408:d23105f0d146 2409:656eeb7197fa
   982     "Modified: 24.6.1996 / 14:39:07 / stefan"
   982     "Modified: 24.6.1996 / 14:39:07 / stefan"
   983     "Modified: 30.6.1996 / 16:45:25 / cg"
   983     "Modified: 30.6.1996 / 16:45:25 / cg"
   984     "Created: 31.10.1996 / 14:57:30 / cg"
   984     "Created: 31.10.1996 / 14:57:30 / cg"
   985 !
   985 !
   986 
   986 
   987 browseForSymbol:aSymbol title:title warnIfNone:doWarn
   987 browseForSymbol:aSymbol title:title ifNone:actionIfNoneFound searchFor:searchString
   988     "launch a browser for all methods referencing aSymbol"
       
   989 
       
   990     ^ self
       
   991         browseForSymbol:aSymbol 
       
   992         title:title 
       
   993         warnIfNone:doWarn 
       
   994         searchFor:aSymbol
       
   995 
       
   996     "Modified: 31.10.1996 / 14:45:38 / cg"
       
   997 !
       
   998 
       
   999 browseForSymbol:aSymbol title:title warnIfNone:doWarn searchFor:searchString
       
  1000     "launch a browser for all methods referencing aSymbol"
   988     "launch a browser for all methods referencing aSymbol"
  1001 
   989 
  1002     |browser searchBlock sym|
   990     |browser searchBlock sym|
  1003 
   991 
  1004     (aSymbol includesMatchCharacters) ifTrue:[
   992     (aSymbol includesMatchCharacters) ifTrue:[
  1013         "
  1001         "
  1014          can do a faster search
  1002          can do a faster search
  1015         "
  1003         "
  1016         sym := aSymbol asSymbolIfInterned.
  1004         sym := aSymbol asSymbolIfInterned.
  1017         sym isNil ifTrue:[
  1005         sym isNil ifTrue:[
  1018             self showNoneFound:title.
  1006             actionIfNoneFound value.
  1019             ^ nil
  1007             ^ nil
  1020         ].
  1008         ].
  1021 
  1009 
  1022         searchBlock := [:c :m :s |
  1010         searchBlock := [:c :m :s |
  1023                             (m literalsDetect:[:aLiteral|
  1011                             (m literalsDetect:[:aLiteral|
  1024                                 (sym == aLiteral) 
  1012                                 (sym == aLiteral) 
  1025                             ] ifNone:nil) notNil
  1013                             ] ifNone:nil) notNil
  1026                        ].
  1014                        ].
  1027     ].
  1015     ].
  1028     doWarn ifFalse:[
  1016 
  1029         WarningSignal ignoreIn:[
  1017     WarningSignal ignoreIn:[
       
  1018         InformationSignal ignoreIn:[
  1030             browser := self browseMethodsWhere:searchBlock title:title.
  1019             browser := self browseMethodsWhere:searchBlock title:title.
  1031         ]
  1020         ]
  1032     ] ifTrue:[
  1021     ].
  1033         browser := self browseMethodsWhere:searchBlock title:title.
  1022     browser isNil ifTrue:[
       
  1023         actionIfNoneFound value
  1034     ].
  1024     ].
  1035 
  1025 
  1036     (browser notNil 
  1026     (browser notNil 
  1037     and:[searchString notNil]) ifTrue:[
  1027     and:[searchString notNil]) ifTrue:[
  1038         browser autoSearch:searchString
  1028         browser autoSearch:searchString
  1040     ^ browser
  1030     ^ browser
  1041 
  1031 
  1042     "Modified: 24.6.1996 / 14:39:07 / stefan"
  1032     "Modified: 24.6.1996 / 14:39:07 / stefan"
  1043     "Created: 31.10.1996 / 14:45:08 / cg"
  1033     "Created: 31.10.1996 / 14:45:08 / cg"
  1044     "Modified: 31.10.1996 / 14:46:07 / cg"
  1034     "Modified: 31.10.1996 / 14:46:07 / cg"
       
  1035 !
       
  1036 
       
  1037 browseForSymbol:aSymbol title:title warnIfNone:doWarn
       
  1038     "launch a browser for all methods referencing aSymbol"
       
  1039 
       
  1040     ^ self
       
  1041         browseForSymbol:aSymbol 
       
  1042         title:title 
       
  1043         warnIfNone:doWarn 
       
  1044         searchFor:aSymbol
       
  1045 
       
  1046     "Modified: 31.10.1996 / 14:45:38 / cg"
       
  1047 !
       
  1048 
       
  1049 browseForSymbol:aSymbol title:title warnIfNone:doWarn searchFor:searchString
       
  1050     "launch a browser for all methods referencing aSymbol"
       
  1051 
       
  1052     ^ self
       
  1053         browseForSymbol:aSymbol 
       
  1054         title:title 
       
  1055         ifNone:(doWarn ifTrue:[[self showNoneFound:title]] ifFalse:nil) 
       
  1056         searchFor:searchString
  1045 !
  1057 !
  1046 
  1058 
  1047 browseImplementorsOf:aSelectorString
  1059 browseImplementorsOf:aSelectorString
  1048     "launch a browser for all implementors of aSelector"
  1060     "launch a browser for all implementors of aSelector"
  1049 
  1061 
  1222    "
  1234    "
  1223 
  1235 
  1224     "Modified: / 30.10.1997 / 23:45:52 / cg"
  1236     "Modified: / 30.10.1997 / 23:45:52 / cg"
  1225 !
  1237 !
  1226 
  1238 
       
  1239 browseReferendsOf:aGlobalName ifNone:actionIfNone
       
  1240     "launch a browser for all methods referencing a global
       
  1241      named aGlobalName.
       
  1242     "
       
  1243 
       
  1244     ^ self
       
  1245         browseReferendsOf:aGlobalName 
       
  1246         title:(self classResources string:'users of: %1' with:aGlobalName)
       
  1247         ifNone:actionIfNone
       
  1248 
       
  1249     "Modified: / 31.10.1997 / 15:42:05 / cg"
       
  1250 
       
  1251 
       
  1252 !
       
  1253 
  1227 browseReferendsOf:aGlobalName in:aSetOfClasses
  1254 browseReferendsOf:aGlobalName in:aSetOfClasses
  1228     "launch a browser for all methods referencing a global
  1255     "launch a browser for all methods referencing a global
  1229      named aGlobalName.
  1256      named aGlobalName.
  1230     "
  1257     "
  1231 
  1258 
  1258 
  1285 
  1259     "Created: 10.7.1996 / 10:37:02 / cg"
  1286     "Created: 10.7.1996 / 10:37:02 / cg"
  1260     "Modified: 31.10.1996 / 14:56:38 / cg"
  1287     "Modified: 31.10.1996 / 14:56:38 / cg"
  1261 !
  1288 !
  1262 
  1289 
  1263 browseReferendsOf:aGlobalName title:title warnIfNone:doWarn
  1290 browseReferendsOf:aGlobalName title:title ifNone:actionIfNone
  1264     "launch a browser for all methods referencing a global
  1291     "launch a browser for all methods referencing a global
  1265      named aGlobalName.
  1292      named aGlobalName.
  1266     "
  1293     "
  1267 
  1294 
  1268     |globalsPlainName idx|
  1295     |globalsPlainName idx|
  1276         ]
  1303         ]
  1277     ].
  1304     ].
  1278 
  1305 
  1279     ^ self browseForSymbol:aGlobalName 
  1306     ^ self browseForSymbol:aGlobalName 
  1280                      title:title 
  1307                      title:title 
  1281                 warnIfNone:doWarn
  1308                     ifNone:actionIfNone
  1282                  searchFor:globalsPlainName
  1309                  searchFor:globalsPlainName
  1283 
  1310 
  1284     "Modified: / 31.10.1996 / 14:47:48 / cg"
  1311     "Modified: / 31.10.1996 / 14:47:48 / cg"
  1285     "Created: / 31.10.1997 / 15:41:28 / cg"
  1312     "Created: / 31.10.1997 / 15:41:28 / cg"
       
  1313 
       
  1314 
       
  1315 !
       
  1316 
       
  1317 browseReferendsOf:aGlobalName title:title warnIfNone:doWarn
       
  1318     "launch a browser for all methods referencing a global
       
  1319      named aGlobalName.
       
  1320     "
       
  1321 
       
  1322     ^ self
       
  1323         browseReferendsOf:aGlobalName 
       
  1324         title:title 
       
  1325         ifNone:(doWarn ifTrue:[[self showNoneFound:title]] ifFalse:nil)
       
  1326 
  1286 !
  1327 !
  1287 
  1328 
  1288 browseReferendsOf:aGlobalName warnIfNone:doWarn
  1329 browseReferendsOf:aGlobalName warnIfNone:doWarn
  1289     "launch a browser for all methods referencing a global
  1330     "launch a browser for all methods referencing a global
  1290      named aGlobalName.
  1331      named aGlobalName.
  2038 ! !
  2079 ! !
  2039 
  2080 
  2040 !SystemBrowser class methodsFor:'documentation'!
  2081 !SystemBrowser class methodsFor:'documentation'!
  2041 
  2082 
  2042 version
  2083 version
  2043     ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.93 1999-09-17 16:57:41 cg Exp $'
  2084     ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.94 1999-09-23 12:15:54 cg Exp $'
  2044 ! !
  2085 ! !
  2045 SystemBrowser initialize!
  2086 SystemBrowser initialize!