changed: expecco_2_0_0 expecco_2_0_0_0
authorClaus Gittinger <cg@exept.de>
Sun, 17 Jul 2011 11:13:33 +0200
changeset 4058 8221d2e915df
parent 4057 a5e1c40ecf26
child 4059 b8d390e67d16
changed: #codeCompletionForMessage:inClass:codeView: #lookupClassForMessage:inClass:
DoWhatIMeanSupport.st
--- a/DoWhatIMeanSupport.st	Sun Jul 17 11:13:22 2011 +0200
+++ b/DoWhatIMeanSupport.st	Sun Jul 17 11:13:33 2011 +0200
@@ -311,11 +311,11 @@
     findBest := [:node :selector |
         |srchClass bestSelectors bestPrefixes|
 
-        srchClass := self lookupClassForMessage:node inClass:classOrNil.
-        srchClass notNil ifTrue:[
-            bestSelectors := Parser findBest:30 selectorsFor:selector in:srchClass forCompletion:true.
-        ] ifFalse:[
-            codeView topView withCursor:(Cursor questionMark) do:[
+        codeView topView withCursor:(Cursor questionMark) do:[
+            srchClass := self lookupClassForMessage:node inClass:classOrNil.
+            srchClass notNil ifTrue:[
+                bestSelectors := Parser findBest:30 selectorsFor:selector in:srchClass forCompletion:true.
+            ] ifFalse:[
                 bestSelectors := Parser findBest:30 selectorsFor:selector in:nil forCompletion:true.
             ].
         ].
@@ -515,7 +515,7 @@
 
     "Created: / 10-11-2006 / 13:18:27 / cg"
     "Modified: / 16-02-2010 / 10:33:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 06-07-2011 / 13:59:12 / cg"
+    "Modified: / 17-07-2011 / 10:32:05 / cg"
 !
 
 codeCompletionForMethod:node inClass:classOrNil codeView:codeView
@@ -1123,11 +1123,16 @@
                 ]
             ].
         ].
+        classProvidingNamespaceOrNil notNil ifTrue:[
+            (receiver receiver isSelf and:[receiver selector = 'class']) ifTrue:[
+                ^ classProvidingNamespaceOrNil class
+            ].
+        ].
     ].
     ^ nil
 
     "Modified: / 24-08-2010 / 15:05:49 / sr"
-    "Modified: / 06-07-2011 / 14:15:55 / cg"
+    "Modified: / 17-07-2011 / 10:28:19 / cg"
 !
 
 old_askUserForCompletion:what for:codeView from:allTheBest
@@ -2172,5 +2177,5 @@
 !DoWhatIMeanSupport class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/DoWhatIMeanSupport.st,v 1.83 2011-07-08 06:50:09 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DoWhatIMeanSupport.st,v 1.84 2011-07-17 09:13:33 cg Exp $'
 ! !