Completion refactoring (part 1)
- completion handling refactored to use new EditTextViewCompletionSupport
- introduced new, hand-written CompletionView
"{ Package: 'jv:smallsense' }"
"{ NameSpace: SmallSense }"
Object subclass:#CompletionContext
instanceVariableNames:'node position position1'
classVariableNames:''
poolDictionaries:''
category:'SmallSense-Core'
!
!CompletionContext class methodsFor:'instance creation'!
node: node position: position
^self new node: node position: position
"Created: / 26-11-2011 / 16:22:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CompletionContext methodsFor:'accessing'!
node
^ node
!
position
^ position
! !
!CompletionContext methodsFor:'initialization'!
node:nd position: pos
node := nd.
position := pos.
position1 := pos - 1
"Created: / 26-11-2011 / 16:22:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CompletionContext methodsFor:'queries'!
isAfterNode
^ node notNil and:[node endPosition < position1]
"Created: / 26-11-2011 / 16:24:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 24-09-2013 / 13:11:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
isBeforeNode
^node notNil and:[position < node startPosition]
"Created: / 26-11-2011 / 16:24:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 24-09-2013 / 13:11:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
isInNode
^ node notNil and:[position1 between:node startPosition and:node endPosition]
"Created: / 26-11-2011 / 16:24:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 24-09-2013 / 13:12:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!CompletionContext class methodsFor:'documentation'!
version_HG
^ '$Changeset: <not expanded> $'
!
version_SVN
^ '$Id: SmallSensePosition.st 7823 2011-11-26 16:55:59Z vranyj1 $'
! !