How to provide a custom AutoComplete backend?

Post a reply

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: How to provide a custom AutoComplete backend?

Re: How to provide a custom AutoComplete backend?

Post by robert » Sat Sep 14, 2013 2:38 am

Glad you're up and running! Another solution is to subclass AbstractCompletionProvider and override getCompletionsImpl() (which you could override when extending DefaultCompletionProvider as well).

Re: How to provide a custom AutoComplete backend?

Post by oskar » Wed Sep 11, 2013 4:35 pm

Looks like I figured it out. I subclassed DefaultCompletionProvider and overrode the getCompletions method.

How to provide a custom AutoComplete backend?

Post by oskar » Wed Sep 11, 2013 3:51 pm

I'm interested in using the AutoComplete library, but I do not want to provide it with a static list of completions like the example shows. Instead, I would like to use my own custom function that takes the input text and returns a list of completions.

I tried subclassing DefaultCompletionProvider, overriding the getCompletionByInputText method, but it doesn't appear to be called when Ctrl+Space is hit. Is there another way to override the backend in this manner?

Top