SmallSense__CompletionEngine.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 02 Oct 2013 13:37:01 +0100
changeset 117 441529422c2f
child 118 88e6fd734a11
permissions -rw-r--r--
Completion support refactored to make it more pluggable/extendable.

"{ Package: 'jv:smallsense' }"

"{ NameSpace: SmallSense }"

Object subclass:#CompletionEngine
	instanceVariableNames:'codeView'
	classVariableNames:''
	poolDictionaries:''
	category:'SmallSense-Core'
!

!CompletionEngine class methodsFor:'testing'!

isAbstract
    ^ self == CompletionEngine

    "Created: / 02-10-2013 / 13:11:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!CompletionEngine methodsFor:'completion'!

complete
    "Compute completion for `codeView`, taking all the information
     from it. Returns a CompletionResult with computed completions"        

    ^ self subclassResponsibility

    "Modified (comment): / 02-10-2013 / 13:33:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

completeFor: aCodeView2OrTextEditView
    "Compute completion for given codeView, taking all the information
     from it. Returns a CompletionResult with computed completions"

    codeView := aCodeView2OrTextEditView.
    ^ self complete.

    "Created: / 02-10-2013 / 13:24:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !