Not working as expected

Questions on using RSyntaxTextArea should go here.

Moderator: robert

Not working as expected

Postby Debels » Wed Feb 19, 2014 1:16 am

So I have a couple of problems regarding AutoCompletion, I have the following:

java code:

AutoCompletion ac = new AutoCompletion(provider);
ac.setTriggerKey(KeyStroke.getKeyStroke("control SPACE"));

From what I read on the website its supposed to show the auto complete window when you stop typing for 1/2 second, but no window pops up. What am I doing wrong?

Also when I write a token next to a parenthesis or any similar it doesn't recognize it, is there a way around this?

Thanks for reading,
Posts: 9
Joined: Fri Feb 14, 2014 4:02 pm

Re: Not working as expected

Postby robert » Thu Feb 27, 2014 3:21 am

On your CompletionProvider, in order to make the popups appear on "regular" characters (i.e. not just "."), you'll need to call:

provider.setAutoActivationRules(true, "._")

This tells the system to display the completion choices on all letters and digits, as well as "." and "_".
User avatar
Posts: 852
Joined: Sat May 10, 2008 5:16 pm

Re: Not working as expected

Postby Debels » Tue Mar 04, 2014 10:06 pm

oh, thanks a lot
Posts: 9
Joined: Fri Feb 14, 2014 4:02 pm

Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest