--- a/SmallSense__CompletionController.st Tue Apr 08 15:03:38 2014 +0200
+++ b/SmallSense__CompletionController.st Tue Apr 08 21:46:51 2014 +0200
@@ -231,13 +231,14 @@
the complection window should be closed or false
if it shall be kept open."
- | list prefix matcher matches1 matches2 |
+ | list prefix matcher1 matches1 matcher2 matches2 |
list := completionView list.
- matcher := CompletionEngine matcher.
+ matcher1 := CompletionEngine exactMatcher.
+ matcher2 := CompletionEngine inexactMatcher.
prefix := support wordBeforeCursor.
- matches1 := list select:[:po | po stringToComplete startsWith: prefix string ].
+ matches1 := list select:[:po | matcher1 value: prefix value: po stringToComplete ].
matches1 notEmptyOrNil ifTrue:[
matches1 size == 1 ifTrue:[
completionView selection: matches1 anElement.
@@ -245,7 +246,6 @@
self complete.
^ true
].
- ^ false
] ifFalse:[
| selection |
@@ -255,11 +255,11 @@
ifFalse:[mostrelevant]
].
completionView selection: selection.
- ^ false.
- ]
+ ].
+ ^ false
].
- matches2 := completionView list select:[:po | matcher value: prefix value: po stringToComplete ].
+ matches2 := completionView list select:[:po | matcher2 value: prefix value: po stringToComplete ].
matches2 notEmptyOrNil ifTrue:[
matches2 size == 1 ifTrue:[
completionView selection: matches2 anElement.
@@ -279,7 +279,7 @@
^ false.
"Created: / 27-09-2013 / 16:16:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 03-04-2014 / 23:57:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 08-04-2014 / 21:32:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CompletionController methodsFor:'private-API'!