[Groovy] Code completion show only *Parallel proposals

I recently came across with a pretty strange auto-complete behaviour in groovy files. It seems that when the prefix (say find) is corresponding to both normal methods and their parallel counterparts, only later proposals (*Parallel) are displayed. In order to reveil the non-parallel methods I have to hit CTRL-SPACE again.


final def file = new File('examples/ch9_2/Test.txt')
assert file.find<CARET> // Ctrl+Space -> shows only the following proposals findAllParallel, findAnyParallel & findParallel.

My project is maven-based and depends both on groovy-all (v.1.8.5 ) and gpars (v. 0.12)   

Linux 10.04 32 bits
Oracle JDK 1.6.0_29-b11 32 bits
Idea IU 11.0.1 b.111.167

Is this an known issue or an IDE misconfiguration?

Thank you in advance for any useful information.

Comment actions Permalink

Hi, this looks like a consequence of http://youtrack.jetbrains.net/issue/IDEA-48674. Invoking completion for the second time should help.

Comment actions Permalink

Thank you Peter for useful comment.
IMO the autocomplete filer should be smart enough to display some methods from  DefaultGroovyMethods class in certain cases (i.e. Collection related methods) on first autocomple (Ctrl-Space).
I've put a comment on the youtrack issue IDEA-48674 concerning this consequence.
Do you know if there is a configuration to adress this problem/consequence?

Thank you in advance.

Comment actions Permalink

Of course, Collection-related methods are suggested on the first completion when the qualified has a collection type (it's indicated in the issue text). But a File isn't a collection, or am I missing something?

No, there's no setting for this.

Comment actions Permalink

I've tried also with List but grep proposal is shown at second autocomplete.
Please see the attachment.

It would be nice if the autocomplete could gather the information about frequent used proposals and promote them as candidates for 1st completion.
In Eclipse  there is an ambitious project in this regard (http://www.eclipse.org/recommenders/).
It would be a great addition to the already powerful autocomplele feature in IDEA.

Thank you

Comment actions Permalink

I'd suggest to file a separate issue listing those GDK methods that you consider to be filtered out for a wrong reason.

Usage-based completion heuristics seem attractive, but in fact they often lead to complete unpredicatbility of IDE behavior. It's just not clear why it suggests different variants in different locations and this changes over the time. Now it's at least consistent.


Please sign in to leave a comment.