Completion, another sorting way.

Questions on using RSyntaxTextArea should go here.

Moderator: robert

Completion, another sorting way.

Postby Matias22 » Fri Feb 26, 2010 4:51 pm

Hello everyone, firstly I would like to say thanx for this great jon.

And now I have question. So. Primarily we can add new Word to Completion by for example:

provider.addCompletion(new BasicCompletion(provider, "ZONE"));

And I need to create something like:

provider.addCompletion(new BasicCompletion(provider, JAVA_KEY));

Where:

private String[] JAVA_KEY = { "1stword", "2ndword", "3rdword" } ;

etc.

Someone can help me?

Thanks in advice.
Matias22
 
Posts: 13
Joined: Fri Feb 26, 2010 4:46 pm

Re: Completion, another sorting way.

Postby robert » Sat Feb 27, 2010 10:44 pm

I'm not sure I understand, could you not just do this:

Code: Select all
for (int i=0; i<JAVA_KEY.length; i++) {
   provider.addCompletion(new BasicCompletion(provider, JAVA_KEY[i]));
}

?

Let me know if I'm not understanding you. Also note that you're not limited to BasicCompletion; you can create your own Completion implementations as well. Check out the Javadoc for the AutoComplete library if you're interested, and feel free to post questions or comments here.
User avatar
robert
 
Posts: 785
Joined: Sat May 10, 2008 5:16 pm

Re: Completion, another sorting way.

Postby Matias22 » Thu Mar 04, 2010 6:38 pm

Thank you, works now :)
Matias22
 
Posts: 13
Joined: Fri Feb 26, 2010 4:46 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron