SmallSense__CompletionEngine.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 03 Oct 2013 11:41:07 +0100
changeset 118 88e6fd734a11
parent 117 441529422c2f
child 120 4fefce92f5bb
permissions -rw-r--r--
Some more fixes in complete-as-you-type support... ...to make it less annoying. Still not ideal.

"{ Package: 'jv:smallsense' }"

"{ NameSpace: SmallSense }"

Object subclass:#CompletionEngine
	instanceVariableNames:'codeView result'
	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.
    result := CompletionResult new.
    ^ self complete.

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