Do not cache completion controller in edit support.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sun, 18 May 2014 12:57:20 +0100
changeset 219 c69943a410fd
parent 218 0f5b160ecb9d
child 220 a0c9cfa85221
Do not cache completion controller in edit support.
SmallSense__EditSupport.st
SmallSense__JavaEditSupport.st
SmallSense__SmalltalkEditSupport.st
abbrev.stc
jv_smallsense.st
smallsense.rc
--- a/SmallSense__EditSupport.st	Sun May 18 12:29:12 2014 +0100
+++ b/SmallSense__EditSupport.st	Sun May 18 12:57:20 2014 +0100
@@ -302,16 +302,17 @@
 !EditSupport methodsFor:'initialization'!
 
 initializeCompletion
+    | controller |
+
     UserPreferences current smallSenseCompletionEnabled ifTrue:[
         self completionEngineClass notNil ifTrue:[
-            completionController := self completionControllerClass for: service textView.
-            completionController support: self.
-            service textView completionSupport: completionController.
+            controller := self completionControllerClass for: service textView.
+            controller support: self.
+            service textView completionSupport: controller.
         ].
     ].
 
-    "Created: / 27-09-2013 / 13:20:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 13-05-2014 / 16:13:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Created: / 18-05-2014 / 12:40:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 initializeForService:aSmallSenseService
--- a/SmallSense__JavaEditSupport.st	Sun May 18 12:29:12 2014 +0100
+++ b/SmallSense__JavaEditSupport.st	Sun May 18 12:57:20 2014 +0100
@@ -150,8 +150,10 @@
     lastTypedKey0 := key.
 
     key == #CodeCompletion ifTrue:[ 
-        completionController notNil ifTrue:[
-            ^ completionController handleKeyPress:key x:x y:y 
+        | controller |
+
+        (controller := self textView completionSupport) notNil ifTrue:[
+            ^ controller handleKeyPress:key x:x y:y 
         ].
         ^ false
     ].     
@@ -167,7 +169,7 @@
     ^ false
 
     "Created: / 07-03-2010 / 09:36:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified (format): / 17-05-2014 / 21:23:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 18-05-2014 / 12:45:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 keyPressOpenCurly
--- a/SmallSense__SmalltalkEditSupport.st	Sun May 18 12:29:12 2014 +0100
+++ b/SmallSense__SmalltalkEditSupport.st	Sun May 18 12:57:20 2014 +0100
@@ -184,11 +184,13 @@
     lastTypedKey0 := key.
 
     key == #CodeCompletion ifTrue:[ 
-        completionController notNil ifTrue:[
-            ^ completionController handleKeyPress:key x:x y:y 
+        | controller |
+
+        (controller := self textView completionSupport) notNil ifTrue:[
+            ^ controller handleKeyPress:key x:x y:y 
         ].
         ^ false
-    ].     
+    ]. 
 
     key == #BackSpace ifTrue:[
         backspaceIsUndo ifTrue:[
@@ -226,7 +228,7 @@
     ^ false.
 
     "Created: / 07-03-2010 / 09:36:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 17-05-2014 / 21:22:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 18-05-2014 / 12:45:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 keyPressDoubleColon
--- a/abbrev.stc	Sun May 18 12:29:12 2014 +0100
+++ b/abbrev.stc	Sun May 18 12:57:20 2014 +0100
@@ -62,9 +62,9 @@
 SmallSense::MethodKeywordRestPO SmallSense__MethodKeywordRestPO jv:smallsense 'SmallSense-Core-Interface-PO' 0
 SmallSense::JavaCompletionEngineSimple SmallSense__JavaCompletionEngineSimple jv:smallsense 'SmallSense-Java' 2
 SmallSense::GroovyCompletionEngineSimple SmallSense__GroovyCompletionEngineSimple jv:smallsense 'SmallSense-Groovy' 2
+SmallSense::TestCase SmallSense__TestCase jv:smallsense 'SmallSense-Tests' 1
 SmallSense::BaseTestClass SmallSense__BaseTestClass jv:smallsense 'SmallSense-Tests' 1
 SmallSense::FinderTests SmallSense__FinderTests jv:smallsense 'SmallSense-Tests' 1
 SmallSense::RecognizerTests SmallSense__RecognizerTests jv:smallsense 'SmallSense-Tests' 1
 SmallSense::SmalltalkParserTests SmallSense__SmalltalkParserTests jv:smallsense 'SmallSense-Tests' 1
-SmallSense::TestCase SmallSense__TestCase jv:smallsense 'SmallSense-Tests' 1
 SmallSense::TokenPatternMatcherTests SmallSense__TokenPatternMatcherTests jv:smallsense 'SmallSense-Tests' 1
--- a/jv_smallsense.st	Sun May 18 12:29:12 2014 +0100
+++ b/jv_smallsense.st	Sun May 18 12:57:20 2014 +0100
@@ -222,13 +222,15 @@
         #'SmallSense::MethodKeywordRestPO'
         #'SmallSense::JavaCompletionEngineSimple'
         #'SmallSense::GroovyCompletionEngineSimple'
+        (#'SmallSense::TestCase' autoload)
         (#'SmallSense::BaseTestClass' autoload)
         (#'SmallSense::FinderTests' autoload)
         (#'SmallSense::RecognizerTests' autoload)
         (#'SmallSense::SmalltalkParserTests' autoload)
-        (#'SmallSense::TestCase' autoload)
         (#'SmallSense::TokenPatternMatcherTests' autoload)
     )
+
+    "Modified: / 18-05-2014 / 12:56:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 extensionMethodNames
--- a/smallsense.rc	Sun May 18 12:29:12 2014 +0100
+++ b/smallsense.rc	Sun May 18 12:57:20 2014 +0100
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "6.2.3.0\0"
-      VALUE "ProductDate", "Sun, 18 May 2014 11:26:51 GMT\0"
+      VALUE "ProductDate", "Sun, 18 May 2014 11:56:44 GMT\0"
     END
 
   END