Workspace.st
changeset 6735 2d496aeaf2e1
parent 6732 126a77fb97e1
child 6736 f61a47790174
equal deleted inserted replaced
6734:e8d5a97c068c 6735:2d496aeaf2e1
  2047                         browserClass browseReferendsOf:(pool name,':',nameOfVariable)
  2047                         browserClass browseReferendsOf:(pool name,':',nameOfVariable)
  2048                     ] ifFalse:[
  2048                     ] ifFalse:[
  2049                         (cls notNil
  2049                         (cls notNil
  2050                           and:[ cls nameSpace notNil
  2050                           and:[ cls nameSpace notNil
  2051                           and:[ cls nameSpace isNameSpace            
  2051                           and:[ cls nameSpace isNameSpace            
  2052                           and:[ nameOfVariable knownAsSymbol  
       
  2053                           and:[ (cls nameSpace name,'::',nameOfVariable) "nameOfVariable" knownAsSymbol  
  2052                           and:[ (cls nameSpace name,'::',nameOfVariable) "nameOfVariable" knownAsSymbol  
  2054                           and:[ (nsClass := cls nameSpace at:nameOfVariable asSymbol) notNil
  2053                           and:[ (nsClass := cls nameSpace at:nameOfVariable) notNil
  2055                           and:[ nsClass isBehavior
  2054                           and:[ nsClass isBehavior
  2056                         ]]]]]]) ifTrue:[
  2055                         ]]]]]) ifTrue:[
  2057                             "/ a namespace class?
  2056                             "/ a namespace class?
  2058                             browserClass browseReferendsOf:nsClass name
  2057                             browserClass browseReferendsOf:nsClass name
  2059                         ] ifFalse:[
  2058                         ] ifFalse:[
  2060                             "/ an instvar?
  2059                             "/ an instvar?
  2061                             (cls notNil and:[cls allInstVarNames includes:nameOfVariable]) ifTrue:[
  2060                             (cls notNil and:[cls allInstVarNames includes:nameOfVariable]) ifTrue:[
  2289                 sub disable:#browseReferencesToIt.
  2288                 sub disable:#browseReferencesToIt.
  2290             ] ifFalse:[
  2289             ] ifFalse:[
  2291                 (sel startsWith:'#') ifTrue:[
  2290                 (sel startsWith:'#') ifTrue:[
  2292                     "/ a symbol selected - can search references
  2291                     "/ a symbol selected - can search references
  2293                 ] ifFalse:[
  2292                 ] ifFalse:[
       
  2293                     |cls|
       
  2294 
       
  2295                     cls := self editedClass.
       
  2296 
  2294                     selectedSymbol := sel asSymbolIfInterned.
  2297                     selectedSymbol := sel asSymbolIfInterned.
  2295                     (selectedSymbol notNil
  2298                     ((selectedSymbol notNil and:[Smalltalk includesKey:selectedSymbol])
  2296                      and:[(Smalltalk includesKey:selectedSymbol)
  2299                       or:[ cls notNil and:[cls nameSpace includesKey:sel]]
  2297                           or:[(NameSpace allNameSpaces contains:[:ns | ns includesKey:selectedSymbol]) ]]
       
  2298                     ) ifTrue:[
  2300                     ) ifTrue:[
  2299                         "/ a global or namespace var selected
  2301                         "/ a global or namespace var selected
  2300                     ] ifFalse:[
  2302                     ] ifFalse:[
  2301                         |cls|
       
  2302 
       
  2303                         cls := self editedClass.
       
  2304                         cls notNil ifTrue:[
  2303                         cls notNil ifTrue:[
  2305                             cls := cls theNonMetaclass.
  2304                             cls := cls theNonMetaclass.
  2306                             ((cls allClassVarNames includes:sel)
  2305                             ((cls allClassVarNames includes:sel)
  2307                               or:[ (cls theNonMetaclass privateClassNamed:sel) notNil]) ifTrue:[
  2306                               or:[ (cls theNonMetaclass privateClassNamed:sel) notNil]) ifTrue:[
  2308                                 "/ a classvar or private class
  2307                                 "/ a classvar or private class