AutoComplete problem with popup disappearance

Post a reply

: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: AutoComplete problem with popup disappearance

Re: AutoComplete problem with popup disappearance

Post by robert » Mon Oct 08, 2012 12:14 pm


It's tough to know for sure without more details. Are you using DefaultCompletionProvider with your own Completions? Or are you using RSTALanguageSupport, and if so, what language?

If you're using DefaultCompletionProvider, and want "." to be a valid character in completion text, be sure to override the isValidChar(char) method to also return true for ".", as mentioned above, since it does not do so by default.

Re: AutoComplete problem with popup disappearance

Post by sureshkumarC » Mon Oct 08, 2012 4:36 am

im using autocomplete, when i type "." the popup window disappears. What should be done

Re: AutoComplete problem with popup disappearance

Post by Pylo » Sun Mar 18, 2012 11:34 am

I've solved this problem. Problem was, that every third character, app checked current code and made new completition, so old was deleted. When you clear DefaultCompletitionProvider, popup hides.

Re: AutoComplete problem with popup disappearance

Post by robert » Sat Mar 17, 2012 2:00 pm

Hmm, offhand I can't think of what the problem might be. Can you email me a small sample project that demonstrates the problem?

Re: AutoComplete problem with popup disappearance

Post by Pylo » Fri Mar 16, 2012 7:31 pm

Popup hides when you type more than three characters of any type. I'm using DefaultCompletitionProvider, VariableCompletition and FunctionCompletition. I've programmed code, that loads functions and variables using reflection to DefaultCompletitionProvider. Than code adds descpription based on JavaDOC. I've also made new CellRender for JList, that uses icons for function and variable completition. Here i'll post parts of my code:

Implementation of completition provider:

AutoCompletion ac = new AutoCompletion(provider);
ac.setListCellRenderer(new JavaCellRenderer());

Than I add completitions to DefaultCompletitionProvider dinamicly (when yout type ".", it loads all functions and add them to DefaultCompletitionProvider - old completitions are removed):


for(int i = 0; i<meth.length; i++){
Method method = (Method) meth[i];
FunctionCompletion fc = new FunctionCompletion(provider, method.getName(), method.getReturnType().getSimpleName());
fc.setShortDescription(DOCParser.getDesc(method.getDeclaringClass().getName(), method.getName()));
ArrayList list = new ArrayList();
Class[] clas = method.getParameterTypes();
for(int is = 0; is<clas.length; is++){
list.add(new ParameterizedCompletion.Parameter(clas[is].getSimpleName(), ""));

Problem is, because three characters are in word "set", so if you want to get AutoCompletition for example "setSize", you type "set" and popup disappears, so you can't use AutoCompletition for functions with name, longer than three characters .

Re: AutoComplete problem with popup disappearance

Post by robert » Thu Mar 15, 2012 10:30 pm

Is it always the fourth character that hides the popup window, or is it variable? Is the character that hides the window a letter/digit/underscore, or something else? Note that if you're using a DefaultCompletionProvider, by default the isValidChar(char) method only accepts specific "word" characters. Anything else may cause no completion matches to be found and the completion popup to hide.

More information on your setup would be necessary to diagnose the problem. Are you using DefaultCompletionProvider and an input XML file listing possible completions? Or are you doing a more custom CompletionProvider?

AutoComplete problem with popup disappearance

Post by Pylo » Thu Mar 15, 2012 2:55 pm

I'm devloping app that uses AutoComplete addon library. i've added it to RSyntaxTextArea an everything looks OK. But when you type more than 3 characters, AutoCompletePopupWindow disappears. I have already looked in JavaDOC page and source too, but i can't find solution :shock:. In RText this thing is working OK, why it isnt working for me? Please someone help me.