--- a/SmallSense__CompletionContext.st Mon Mar 31 22:31:38 2014 +0200
+++ b/SmallSense__CompletionContext.st Mon Mar 31 23:43:25 2014 +0200
@@ -65,34 +65,17 @@
!CompletionContext methodsFor:'private'!
wordBeforeCursor
- ^ self wordBeforeCursorConsisitingOfCharactersMatching: [:c | c isAlphaNumeric ].
+ ^ support wordBeforeCursor.
"Created: / 27-09-2013 / 15:53:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 20-10-2013 / 00:17:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-03-2014 / 23:03:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
wordBeforeCursorConsisitingOfCharactersMatching: characterMatchBlock
- | textView currentLine wordStart wordEnd |
- textView := self codeView.
- textView isCodeView2 ifTrue:[textView := textView textView].
- currentLine := textView list at: textView cursorLine.
- currentLine isNil ifTrue:[ ^ '' ].
- wordEnd := textView cursorCol - 1.
- wordEnd > currentLine size ifTrue:[ ^ '' ].
- wordEnd ~~ 0 ifTrue:[
- wordStart := wordEnd.
- [ wordStart > 0 and:[characterMatchBlock value:(currentLine at: wordStart) ] ] whileTrue:[
- wordStart := wordStart - 1.
- ].
- wordStart := wordStart + 1.
- wordStart <= wordEnd ifTrue:[
- ^ currentLine copyFrom: wordStart to: wordEnd.
- ].
- ].
- ^ ''
+ ^ support wordBeforeCursorConsisitingOfCharactersMatching: characterMatchBlock
"Created: / 20-10-2013 / 00:17:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 21-01-2014 / 23:31:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-03-2014 / 23:03:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CompletionContext methodsFor:'queries'!