class: DoWhatIMeanSupport
authorClaus Gittinger <cg@exept.de>
Fri, 16 Aug 2013 19:13:19 +0200
changeset 4326 4dbf9b13bc59
parent 4325 ac76719332a6
child 4327 9fa4f8804902
class: DoWhatIMeanSupport changed: #codeCompletionForClass:context:codeView:
DoWhatIMeanSupport.st
--- a/DoWhatIMeanSupport.st	Wed Aug 14 12:24:20 2013 +0200
+++ b/DoWhatIMeanSupport.st	Fri Aug 16 19:13:19 2013 +0200
@@ -1185,6 +1185,25 @@
     [checkedNode notNil] whileTrue:[
         checkedNode isMessage ifTrue:[
             "/ completion in a message-send
+            contextOrNil notNil ifTrue:[
+                |rcvrNode idx rcvr val|
+
+                (rcvrNode := checkedNode receiver) isVariable ifTrue:[
+                    rcvrNode isSelf ifTrue:[
+                        classOrNil := contextOrNil receiver class.
+                    ] ifFalse:[
+                        (idx := contextOrNil argAndVarNames indexOf:rcvrNode name) ~~ 0 ifTrue:[
+                            val := contextOrNil argsAndVars at:idx.
+                            classOrNil := val class.
+                        ] ifFalse:[
+                            (idx := contextOrNil receiver class allInstVarNames indexOf:rcvrNode name) ~~ 0 ifTrue:[
+                                val := contextOrNil receiver instVarNamed:rcvrNode name.
+                                classOrNil := val class.
+                            ]
+                        ]
+                    ]
+                ].
+            ].
             self codeCompletionForMessage:checkedNode inClass:classOrNil codeView:codeView.
             ^ self
         ].
@@ -3525,10 +3544,10 @@
 !DoWhatIMeanSupport class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/DoWhatIMeanSupport.st,v 1.115 2013-07-30 07:13:45 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DoWhatIMeanSupport.st,v 1.116 2013-08-16 17:13:19 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/DoWhatIMeanSupport.st,v 1.115 2013-07-30 07:13:45 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DoWhatIMeanSupport.st,v 1.116 2013-08-16 17:13:19 cg Exp $'
 ! !