SystemBrowser.st
changeset 5546 8d1e9c32cf4a
parent 5270 d72d63a6dfac
child 5761 b350e042dc9f
--- a/SystemBrowser.st	Thu Feb 19 02:40:13 2004 +0100
+++ b/SystemBrowser.st	Thu Feb 19 15:19:38 2004 +0100
@@ -3075,7 +3075,7 @@
     "
 
     |globalsPlainName idx searchBlock
-     sym browser|
+     sym browser matchingGlobalNames|
 
     globalsPlainName := aGlobalName.
     (idx := globalsPlainName lastIndexOf:$:) ~~ 0 ifTrue:[
@@ -3086,7 +3086,10 @@
         ]
     ].
 
+    matchingGlobalNames := OrderedCollection new.
+
     (sym := aGlobalName asSymbolIfInterned) notNil ifTrue:[
+        matchingGlobalNames add:sym.
         searchBlock := [:cls :mthd :sel | |mSource|
                         "/ kludge: Lazy methods do not include symbols in the literal array - sigh
                         mthd isLazyMethod ifTrue:[
@@ -3104,16 +3107,25 @@
             actionIfNone value.
             ^ nil
         ].
-        searchBlock := [:cls :mthd :sel | |mSource|
+        searchBlock := [:cls :mthd :sel | |mSource usedGlobals global|
                         "/ kludge: Lazy methods do not include symbols in the literal array - sigh
                         mthd isLazyMethod ifTrue:[
                             mSource := mthd source.
-                            (mSource notNil
-                            and:[mthd usedGlobals contains:[:lit | aGlobalName match:lit]])
+                            mSource notNil ifTrue:[
+                                usedGlobals := mthd usedGlobals
+                            ]
                         ] ifFalse:[
-                            ((mthd literals contains:[:lit | aGlobalName match:lit])
-                             and:[mthd usedGlobals contains:[:lit | aGlobalName match:lit] ])
-                        ]
+                            (mthd literals contains:[:lit | aGlobalName match:lit]) ifTrue:[
+                                usedGlobals := mthd usedGlobals
+                            ].
+                        ].
+                        usedGlobals notNil ifTrue:[
+                            global := usedGlobals detect:[:lit | aGlobalName match:lit] ifNone:nil.
+                            global notNil ifTrue:[
+                                matchingGlobalNames add:global.
+                            ]
+                        ].
+                        global notNil
                       ]
     ].
     "/ WarningSignal ignoreIn:[
@@ -3124,7 +3136,8 @@
     browser isNil ifTrue:[
         actionIfNone value
     ] ifFalse:[
-        browser autoSearch:globalsPlainName
+        browser autoSearchVariables:matchingGlobalNames readers:true writers:true.
+        "/ browser autoSearch:globalsPlainName.
     ].
     ^ browser
 !
@@ -5210,7 +5223,7 @@
 !SystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.202 2003-10-10 17:19:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/SystemBrowser.st,v 1.203 2004-02-19 14:19:38 cg Exp $'
 ! !
 
 SystemBrowser initialize!