"Round-robin" AutoCompletion enhancement

General Discussion on RSyntaxTextArea.

Moderator: robert

"Round-robin" AutoCompletion enhancement

Postby schlm3@gmail.com » Fri Sep 06, 2013 12:51 pm

Hi Robert
Thank you for providing this great Component.
I am just using RSyntaxTextArea to add syntax highlight and auto completion to our XPath editor (which is used to query our object database).
Since the number of possible code completions is VERY long (take all functions from the XPath2 standard, plus all axes, plus all properties of the object in context), I have subclassed your AutoCompletion class such that it is possible to add additional CompletionProviders. If the User presses "Ctrl-Space" while the popup is already visible, the AutoCompletion switches to the next CompletionProvider in the list of available CompletionProviders (this is actually the same behavior as you have in Eclipse).
Thatlike, I could install one CompletionProvider for the (dynamic) properties completion and one for the XPath-Standard Completion (functions and axes), and I will probably add one more for the JavaBean-completion (as our XPath engine is based on apache-commons JXPath library).

The problem is, that my extension is only possible when changing the AutoCompletion class. This is ok for me for short term, but for long term usage and maintenance, it would be great if you could integrate the required changes into the AutoComplete class.
Shall I post it to this forum or shall I make a fork on Github to initiate a pull request?

If you are interested in, I could also provide the Code for the RoundRobinAutoCompletion of corse.

Kind Regards, Markus
Posts: 3
Joined: Fri Sep 06, 2013 11:56 am

Re: "Round-robin" AutoCompletion enhancement

Postby Roberto » Sun Sep 08, 2013 2:08 am

That sounds like a great addition. Either a pull request on GitHub or a patch will suffice. I'll look at merging it when I get back from vacation late next week.

Re: "Round-robin" AutoCompletion enhancement

Postby schlm3@gmail.com » Fri Sep 13, 2013 2:05 pm

Hi Robert,
I've sent you the patch by email.
Posts: 3
Joined: Fri Sep 06, 2013 11:56 am

Re: "Round-robin" AutoCompletion enhancement

Postby goran_schwarz » Fri Jan 31, 2014 5:25 pm

Hi there!

Just tested the RoundRobinAutoCompletion, nice!

But I'm missing one key feature...
If the entered word doesn't exist in the *first* Provider, then no window is displayed even if the "second" (or third etc) Provider contains the desired word!

A better solution would be to display the first Provider a word exists in.
At next Ctrl-Space, go to next Provider that contains the word

/Goran Schwarz
Posts: 6
Joined: Tue Aug 23, 2011 12:38 pm

Re: "Round-robin" AutoCompletion enhancement

Postby robert » Sat Feb 01, 2014 12:40 am

Please enter a bug report on GitHub to track this.
User avatar
Posts: 760
Joined: Sat May 10, 2008 5:16 pm

Return to Open Discussion

Who is online

Users browsing this forum: No registered users and 3 guests