SystemBrowser.st
changeset 3125 ed9aa14fe97b
parent 3109 c855796e54d9
child 3131 883d7b34bb86
equal deleted inserted replaced
3124:540feceebffa 3125:ed9aa14fe97b
  1927         or:[globalsPlainName = '*']) ifTrue:[
  1927         or:[globalsPlainName = '*']) ifTrue:[
  1928             globalsPlainName := aGlobalName
  1928             globalsPlainName := aGlobalName
  1929         ]
  1929         ]
  1930     ].
  1930     ].
  1931 
  1931 
  1932     aGlobalName knownAsSymbol ifFalse:[
  1932     (sym := aGlobalName asSymbolIfInterned) notNil ifTrue:[
       
  1933         searchBlock := [:cls :mthd :sel | |mSource|
       
  1934                         "/ kludge: Lazy methods do not include symbols in the literal array - sigh
       
  1935                         mthd isLazyMethod ifTrue:[
       
  1936                             mSource := mthd source.
       
  1937                             (mSource notNil
       
  1938                             and:[(mSource includesString:sym)
       
  1939                             and:[mthd usedGlobals includes:sym]])
       
  1940                         ] ifFalse:[ 
       
  1941                             ((mthd refersToLiteral:sym)
       
  1942                              and:[mthd usedGlobals includes:sym])
       
  1943                         ]
       
  1944                       ]
       
  1945     ] ifFalse:[
  1933         aGlobalName includesMatchCharacters ifFalse:[
  1946         aGlobalName includesMatchCharacters ifFalse:[
  1934             actionIfNone value.
  1947             actionIfNone value.
  1935             ^ nil
  1948             ^ nil
  1936         ].
  1949         ].
  1937         searchBlock := [:cls :mthd :sel | |mSource|
  1950         searchBlock := [:cls :mthd :sel | |mSource|
  1943                         ] ifFalse:[
  1956                         ] ifFalse:[
  1944                             ((mthd literals contains:[:lit | aGlobalName match:lit])
  1957                             ((mthd literals contains:[:lit | aGlobalName match:lit])
  1945                              and:[mthd usedGlobals contains:[:lit | aGlobalName match:lit] ])
  1958                              and:[mthd usedGlobals contains:[:lit | aGlobalName match:lit] ])
  1946                         ]
  1959                         ]
  1947                       ]
  1960                       ]
  1948     ] ifTrue:[
       
  1949         sym := aGlobalName asSymbol.
       
  1950         searchBlock := [:cls :mthd :sel | |mSource|
       
  1951                         "/ kludge: Lazy methods do not include symbols in the literal array - sigh
       
  1952                         mthd isLazyMethod ifTrue:[
       
  1953                             mSource := mthd source.
       
  1954                             (mSource notNil
       
  1955                             and:[(mSource includesString:sym)
       
  1956                             and:[mthd usedGlobals includes:sym]])
       
  1957                         ] ifFalse:[ 
       
  1958                             ((mthd refersToLiteral:sym)
       
  1959                              and:[mthd usedGlobals includes:sym])
       
  1960                         ]
       
  1961                       ]
       
  1962     ].
  1961     ].
  1963     WarningSignal ignoreIn:[
  1962     WarningSignal ignoreIn:[
  1964         InformationSignal ignoreIn:[
  1963         InformationSignal ignoreIn:[
  1965             browser := self browseMethodsWhere:searchBlock title:title.
  1964             browser := self browseMethodsWhere:searchBlock title:title.
  1966         ]
  1965         ]
  1969         actionIfNone value
  1968         actionIfNone value
  1970     ] ifFalse:[
  1969     ] ifFalse:[
  1971         browser autoSearch:globalsPlainName
  1970         browser autoSearch:globalsPlainName
  1972     ].
  1971     ].
  1973     ^ browser
  1972     ^ browser
  1974 
       
  1975 
       
  1976 !
  1973 !
  1977 
  1974 
  1978 browseReferendsOf:aGlobalName title:title warnIfNone:doWarn
  1975 browseReferendsOf:aGlobalName title:title warnIfNone:doWarn
  1979     "launch a browser for all methods referencing a global
  1976     "launch a browser for all methods referencing a global
  1980      named aGlobalName.
  1977      named aGlobalName.
  3297 ! !
  3294 ! !
  3298 
  3295 
  3299 !SystemBrowser class methodsFor:'documentation'!
  3296 !SystemBrowser class methodsFor:'documentation'!
  3300 
  3297 
  3301 version
  3298 version
  3302     ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.130 2001-09-05 11:57:39 cg Exp $'
  3299     ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.131 2001-09-07 17:12:01 cg Exp $'
  3303 ! !
  3300 ! !
  3304 SystemBrowser initialize!
  3301 SystemBrowser initialize!