src/GroovyEvaluator.st
branchjk_new_structure
changeset 1612 ba527b3b17aa
parent 1581 70fbc03d2d82
child 1626 715cd7e0e518
--- a/src/GroovyEvaluator.st	Thu Aug 16 12:48:04 2012 +0000
+++ b/src/GroovyEvaluator.st	Thu Aug 16 17:08:40 2012 +0000
@@ -108,7 +108,13 @@
         ].
         binding := WorkspaceBinding
     ] ifFalse: [ 
-        binding := (Java classForName: 'groovy.lang.Binding') new. 
+        binding := (Java classForName: 'groovy.lang.Binding') new.
+        binding setVariable: 'this' to: receiver.
+        binding setVariable: 'self' to: receiver.
+        context notNil ifTrue:[
+            binding setVariable: 'thisContext' to: context.
+        ]
+
     ].
 
     shell := (Java classForName: 'groovy.lang.GroovyShell') newCleared.