#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Mon, 09 May 2016 10:43:10 +0200
changeset 5090 c68614848447
parent 5089 9592bdeeff69
child 5091 5d1a9c80d511
child 5092 50b3a8b7f676
#UI_ENHANCEMENT by cg class: DoWhatIMeanSupport changed: #codeCompletionForVariable:into: #valueAndKindOfVariable:
DoWhatIMeanSupport.st
--- a/DoWhatIMeanSupport.st	Mon May 09 10:08:47 2016 +0200
+++ b/DoWhatIMeanSupport.st	Mon May 09 10:43:10 2016 +0200
@@ -3595,21 +3595,21 @@
 
                     val isBehavior ifTrue:[
                         val isLoaded ifFalse:[
-                            eachName,' ( ', ('autoloaded class in ',(val category ? 'unknown category')) allItalic,' )'
+                            eachName,' (= ', ('autoloaded class in ',(val category ? 'unknown category')) allItalic,' )'
                         ] ifTrue:[
                             val isNameSpace ifTrue:[
                                 eachName,' ( ', 'namespace' allItalic,' )'
                             ] ifFalse:[
-                                eachName,' ( ', ('class in ',(val category ? 'unknown category')) allItalic,' )'
+                                eachName,' (= ', ('class in ',(val category ? 'unknown category')) allItalic,' )'
                             ]
                         ]
                     ] ifFalse:[
                         "/ Parser findBest:30 selectorsFor:'isLite' in:nil forCompletion:true
 
                         (val isLiteral and:[ (printString := val printString) size < 15 ]) ifTrue:[
-                            eachName,' ( ',printString allItalic,' )'
+                            eachName,' (= ',printString allItalic,' )'
                         ] ifFalse:[
-                            eachName,' ( ',val classNameWithArticle allItalic,' )'
+                            eachName,' (= ',val classNameWithArticle allItalic,' )'
                         ].
                     ].
                 ].
@@ -5102,7 +5102,7 @@
      it is a good idea to know what the reveiver's value is.
      Sigh - returns nil as value both if unknown AND if a real nil is there"
 
-    |nodeVal con privateClass pool|
+    |nodeVal con privateClass pool sym|
 
     aVariableName isUppercaseFirst ifTrue:[
         classOrNil notNil ifTrue:[
@@ -5121,9 +5121,9 @@
                 ^ { nodeVal . #poolVariable }
             ].
         ].
-        aVariableName knownAsSymbol ifTrue:[
-            nodeVal := Smalltalk at:aVariableName asSymbol.
-            nodeVal notNil ifTrue:[     
+        (sym := aVariableName asSymbolIfInterned) notNil ifTrue:[
+            nodeVal := Smalltalk at:sym.
+            (nodeVal notNil or:[Smalltalk includesKey:sym]) ifTrue:[     
                 ^ { nodeVal . #global }
             ]
         ].