We have just released Groovy-Eclipse 2.1.0.M1. This release includes a number of exciting new features and fixes for over 35 jira issues. For this milestone release, we have focussed on the Eclipse 3.6 stream of Groovy-Eclipse, and are continuing to maintain the 3.5 stream. You can download the milestone releases here:
In this release, we have focussed on the inferencing engine and content assist.
Generics-aware type inferencing
The Groovy-Eclipse inferencing engine is now aware of generic types. For example, the type of the loop variable in a for loop is inferred from the type of the collection expression:
And, of course, the editor will notify you when you are using a loop variable incorrectly:
Generics-aware hover support
Similarly, code hovers now display the generics information of the value being selected:
Improved content assist
We have made a few improvements to content assist to make it easier for users. In addition to the improved type inferencing described above, which will provide better proposals for lists and maps, we have worked on a better sorting algorithm for proposals.
In prior versions of Groovy-Eclipse, the most commonly used content assist proposals such as local variables often got lost amidst rarely used proposals such as Default Groovy Methods and type proposals. Now, we have reworked our relevance algorithm and we ensure that local variables are above, instance methods and fields are next, and type proposals are always last.
As you can see in the screenshot above, the ordering is non-static fields, static fields, non-static methods, static methods, default groovy methods, and finally types.
Extension point for proposal filtering and sorting
For Groovy DSL implementors, we have provided a new extension point for Groovy-Eclipse that allows third-party plugins to provide additional sorting and filtering for Groovy content assist. For more information, see the org.codehaus.groovy.eclipse.codeassist.completion.completionProposalFilter extension point in the org.codehaus.groovy.eclipse.codeassist.completion plugin.
Using named parameters in content assist
There is a new option in the Groovy preferences page for enabling the insertion of named arguments for method calls during content assist. This is perhaps not such an important feature for end-users, but it is useful for DSL implementors who would like to force certain kinds of methods to be always completed with named parameters. There is new API available to create named-parameter method proposals.
We appreciate community support and feedback. If you wish to join the discussion about Groovy-Eclipse then please sign up for the mailing list. For any issues you have (or enhancements you'd like to see), please raise them in our issue tracker.