Code completion and DGM methods

Hi,

when using code completion in Groovy code, DGM methods are also shown. Because there are many of them, it can become quite hard to find the method one is actually looking for. Therefore I propose to add a checkbox "Include DGM methods" to the code completion pop-up, similar to "Include non-project classes" in the "Go to Class" pop-up. By default, DGM methods should not be shown, because usually one is looking for something else. Alternatively, a new code completion setting "Auto-complete DGM methods" could be introduced. What do you think?

Cheers,
Peter

PS: I've tried to add DefaultGroovyMethods to the list of excluded classes in the code completion settings, but this didn't give the desired result.

6 comments
Comment actions Permalink

Really? In my mind DGM really make groovy groovy. no each, find, collect et.al? does not seems right to me.

0
Comment actions Permalink

Oh, thats what you mean by DGM. I revoke my "good idea".

However, I do find that the list of methods offered is very large. Something like eclipse, where you can press "alt-enter" and cycle thru different proposals would be nice: first, the methods directly on the class, second the DGM methods, third templates, etc.

0
Comment actions Permalink

I also find current completion somewhat cluttered with methods I'm not really interested in.
When I hit Ctrl+Space after a dot - it's close to unusable as I have to list through all methods available for each Groovy Object - having a checkbox here (turned on on by default) seems like a grear idea to me: I can filter out a list with a single click!

0
Comment actions Permalink

That's right, voted up for that.

0

Please sign in to leave a comment.