Make GroovyCompletionEngineSimple use a GrrovyScanner (instead of JavaScanner)
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 13 May 2014 17:47:41 +0100
changeset 207 543ed815511c
parent 206 f74a5ffd8eae
child 208 0b9ed08a04c0
Make GroovyCompletionEngineSimple use a GrrovyScanner (instead of JavaScanner)
SmallSense__GroovyCompletionEngineSimple.st
SmallSense__JavaCompletionEngineSimple.st
--- a/SmallSense__GroovyCompletionEngineSimple.st	Tue May 13 17:38:10 2014 +0100
+++ b/SmallSense__GroovyCompletionEngineSimple.st	Tue May 13 17:47:41 2014 +0100
@@ -10,6 +10,16 @@
 !
 
 
+!GroovyCompletionEngineSimple methodsFor:'accessing-class'!
+
+scannerClass
+    "raise an error: this method should be implemented (TODO)"
+
+    ^ GroovyScanner
+
+    "Created: / 13-05-2014 / 17:46:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !GroovyCompletionEngineSimple class methodsFor:'documentation'!
 
 version_HG
--- a/SmallSense__JavaCompletionEngineSimple.st	Tue May 13 17:38:10 2014 +0100
+++ b/SmallSense__JavaCompletionEngineSimple.st	Tue May 13 17:47:41 2014 +0100
@@ -10,6 +10,16 @@
 !
 
 
+!JavaCompletionEngineSimple methodsFor:'accessing-class'!
+
+scannerClass
+    "raise an error: this method should be implemented (TODO)"
+
+    ^ JavaScanner
+
+    "Created: / 13-05-2014 / 17:46:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !JavaCompletionEngineSimple methodsFor:'completion-individual'!
 
 addClassesStartingWith: prefix
@@ -113,7 +123,7 @@
     class := method notNil ifTrue:[method mclass] ifFalse:[codeView editedClass ].
 
     "/ ok, we got three character prefix, now scan the current line...
-    scanner := JavaScanner for: line.
+    scanner := self scannerClass for: line.
     tokens := OrderedCollection new.
     values := OrderedCollection new.
     startPositions := OrderedCollection new.
@@ -192,7 +202,7 @@
     ^ result
 
     "Created: / 02-10-2013 / 13:55:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 13-05-2014 / 17:21:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 13-05-2014 / 17:46:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaCompletionEngineSimple class methodsFor:'documentation'!