Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Groovy
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<p>We have just released Groovy-Eclipse 2.1.0.RC2. This release includes a number of exciting new features and fixes for over <a href="http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&jqlQuery=project+%3D+GRECLIPSE+AND+resolution+in+%28Fixed%2C+%22Won%27t+Fix%22%2C+Duplicate%2C+Incomplete%2C+%22Cannot+Reproduce%22%2C+%22Not+A+Bug%22%29+AND+fixVersion+in+%28%222.1.0Release%22%2C+%222.1.0RC2%22%2C+%222.1.0RC1%22%29+ORDER+BY+updated+DESC">50 jira issues</a>. For this 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:</p> <table class="wysiwyg-macro" data-macro-name="info" data-macro-parameters="title=Groovy-Eclipse update site for Eclipse 3.6" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm86dGl0bGU9R3Jvb3Z5LUVjbGlwc2UgdXBkYXRlIHNpdGUgZm9yIEVjbGlwc2UgMy42fQ&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"> <p><code><a href="http://dist.springsource.org/release/GRECLIPSE/e3.6/">http://dist.springsource.org/release/GRECLIPSE/e3.6/</a></code></p></td></tr></table> <table class="wysiwyg-macro" data-macro-name="info" data-macro-parameters="title=Groovy-Eclipse update site for Eclipse 3.5" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm86dGl0bGU9R3Jvb3Z5LUVjbGlwc2UgdXBkYXRlIHNpdGUgZm9yIEVjbGlwc2UgMy41fQ&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"> <p><code><a href="http://dist.springsource.org/release/GRECLIPSE/e3.5/">http://dist.springsource.org/release/GRECLIPSE/e3.5/</a></code></p></td></tr></table> <p>In this release, we have focussed on the inferencing engine and content assist.</p> <h3>Outline</h3> <img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e3RvYzptYXhMZXZlbD00fGluZGVudD0yMHB4fHN0eWxlPWRpc2N9&locale=en_GB&version=2" data-macro-name="toc" data-macro-parameters="indent=20px|maxLevel=4|style=disc"> <h3>Compatibility</h3> <p>Groovy-Eclipse 2.1.0 includes Groovy 1.7.5 and is installable on Eclipse 3.5.2, 3.6.0, and 3.6.1.</p> <h3>Update site zips</h3> <p>Zipped versions of the update sites are available at:</p> <table class="wysiwyg-macro" data-macro-name="info" data-macro-parameters="title=Zipped Groovy-Eclipse update site for Eclipse 3.6" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm86dGl0bGU9WmlwcGVkIEdyb292eS1FY2xpcHNlIHVwZGF0ZSBzaXRlIGZvciBFY2xpcHNlIDMuNn0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"> <p><code><a href="http://dist.springsource.org/release/GRECLIPSE/e3.6/archive-2.1.0.xx-20101020-1000-e36-release.zip">http://dist.springsource.org/release/GRECLIPSE/e3.6/archive-2.1.0.xx-20101020-1000-e36-release.zip</a></code></p></td></tr></table> <table class="wysiwyg-macro" data-macro-name="info" data-macro-parameters="title=Zipped Groovy-Eclipse update site for Eclipse 3.5" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm86dGl0bGU9WmlwcGVkIEdyb292eS1FY2xpcHNlIHVwZGF0ZSBzaXRlIGZvciBFY2xpcHNlIDMuNX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"> <p><code><a href="http://dist.springsource.org/release/GRECLIPSE/e3.5/archive-2.1.0.20101020-2100-e35-release.zip">http://dist.springsource.org/release/GRECLIPSE/e3.5/archive-2.1.0.20101020-2100-e35-release.zip</a></code></p></td></tr></table> <h3>Generics-aware type inferencing</h3> <p>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:</p> <p><img class="confluence-embedded-image confluence-content-image-border" src="/download/attachments/231080063/generics_inferencing.png?version=1&modificationDate=1369304342723" data-image-src="/download/attachments/231080063/generics_inferencing.png?version=1&modificationDate=1369304342723" data-linked-resource-id="231375470" data-linked-resource-type="attachment" data-linked-resource-default-alias="generics_inferencing.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231080063" title="null > generics_inferencing.png"></p> <p>And, of course, the editor will notify you when you are using a loop variable incorrectly:</p> <p><img class="confluence-embedded-image confluence-content-image-border" src="/download/attachments/231080063/generics_inferencing_underline.png?version=1&modificationDate=1369304342729" data-image-src="/download/attachments/231080063/generics_inferencing_underline.png?version=1&modificationDate=1369304342729" data-linked-resource-id="231375471" data-linked-resource-type="attachment" data-linked-resource-default-alias="generics_inferencing_underline.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231080063" title="null > generics_inferencing_underline.png"></p> <p>There are a couple of pieces not yet implemented in this area, that we are planning post 2.1.0. First, inferencing of the type of the closure variable inside of <code>DefaultGroovyMethods</code> is not available yet. For example:</p> <table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> def x = [1, 2] x.each { print it.abs() } </pre></td></tr></table> <p>In this situation, the type of <code>it</code> is Integer and the <code>abs()</code> method is valid, but it will be underlined in the Groovy editor.</p> <p>Also, type inferencing for maps and lists is currently simple. The static type of the first element of the list or map is looked at. If the type can be determined, then it is used, otherwise <code>Object</code> is used.</p> <h3>Generics-aware hover support</h3> <p>Similarly, code hovers now display the generics information of the value being selected:</p> <p><img class="confluence-embedded-image confluence-content-image-border" src="/download/attachments/231080063/generics_hover.png?version=1&modificationDate=1369304342740" data-image-src="/download/attachments/231080063/generics_hover.png?version=1&modificationDate=1369304342740" data-linked-resource-id="231375472" data-linked-resource-type="attachment" data-linked-resource-default-alias="generics_hover.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231080063" title="null > generics_hover.png"></p> <h3>Improved content assist</h3> <p>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.</p> <h4>Sorting</h4> <p>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.</p> <p><img class="confluence-embedded-image confluence-content-image-border" src="/download/attachments/231080063/proposal_sorting.png?version=1&modificationDate=1369304342713" data-image-src="/download/attachments/231080063/proposal_sorting.png?version=1&modificationDate=1369304342713" data-linked-resource-id="231375469" data-linked-resource-type="attachment" data-linked-resource-default-alias="proposal_sorting.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231080063" title="null > proposal_sorting.png"></p> <p>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.</p> <h4>Extension point for proposal filtering and sorting</h4> <p>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 <em>org.codehaus.groovy.eclipse.codeassist.completion.completionProposalFilter</em> extension point in the <em>org.codehaus.groovy.eclipse.codeassist.completion</em> plugin.</p> <h3>Script folders</h3> <p>Groovy-Eclipse now supports the notion of <em>script folders</em>. A script folder is a source folder that is meant to contain Groovy scripts. Groovy scripts are not sent to the compiler, are optionally copied to the appropriate output folder, and have fully editing support enabled (e.g., content assist, hovers, underlining, etc.).</p> <p>Script folders can be configured in Eclipse Preferences -> Groovy -> Compiler preference page:</p> <p><img class="confluence-embedded-image confluence-content-image-border" src="/download/attachments/231080063/script_folder_prefs.png?version=1&modificationDate=1369304342697" data-image-src="/download/attachments/231080063/script_folder_prefs.png?version=1&modificationDate=1369304342697" data-linked-resource-id="231375468" data-linked-resource-type="attachment" data-linked-resource-default-alias="script_folder_prefs.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231080063" title="null > script_folder_prefs.png"></p> <p>Several script folders are included by default, which can be changed if required. Each entry is a regular expression that captures a set of Groovy files to be treated as scripts. The syntax of these regular expressions are similar to the syntax of <a href="http://ant.apache.org/manual/Types/patternset.html">Apache Ant patternSets</a>. By default, script folders are <em>disabled</em> workspace-wide. Uncheck the "Disable script folders..." check box to enable them.</p> <p>Also, each filter entry in the script folders list has a check box. If the box is <em>checked</em> then scripts matching that filter entry are copied to the output folder. If <em>unchecked</em>, the scripts are not copied to the output folder.</p> <p>Groovy scripts are designated through a variant of the groovy icon in the Package Explorer:</p> <p><img class="confluence-embedded-image confluence-content-image-border" src="/download/attachments/231080063/script1.png?version=1&modificationDate=1369304342681" data-image-src="/download/attachments/231080063/script1.png?version=1&modificationDate=1369304342681" data-linked-resource-id="231375467" data-linked-resource-type="attachment" data-linked-resource-default-alias="script1.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231080063" title="null > script1.png"></p> <p>and in the Editor</p> <p><img class="confluence-embedded-image confluence-content-image-border" src="/download/attachments/231080063/script2.png?version=1&modificationDate=1369304342753" data-image-src="/download/attachments/231080063/script2.png?version=1&modificationDate=1369304342753" data-linked-resource-id="231375475" data-linked-resource-type="attachment" data-linked-resource-default-alias="script2.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231080063" title="null > script2.png"></p> <h3>What's next?</h3> <p>The 2.1.0 final release is scheduled for a week from now to coincide with the 2.5.0 release of the <a href="http://www.springsource.com/developer/sts">SpringSource Tool Suite</a> before <a href="http://www.springone2gx.com/conference/chicago/2010/10/home">SpringOne 2GX</a> in October. Because this version is a release candidate, only critical bug fixes will be made between now and the final release.</p> <p>We appreciate community support and feedback. If you wish to join the discussion about Groovy-Eclipse then please sign up for the <a href="http://xircles.codehaus.org/manage_email/eclipse-plugin-user@groovy.codehaus.org">mailing list</a>. For any issues you have (or enhancements you'd like to see), please raise them in our <a href="http://jira.codehaus.org/browse/GRECLIPSE">issue tracker</a>.</p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced