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>The Groovy-Eclipse team is proud to announce the release of Groovy-Eclipse 2.6.0. As usual, we have some exciting new features in this release, including quick fixes/quick assists, improved content assist, and improved search and refactoring. Groovy-Eclipse 2.6.0 includes 1.8.4 support as an optional add-on. Once Grails 2.0 is released officially, we will make Groovy 1.8.x the default compiler in Groovy-Eclipse.</p> <p>You can use the following update site to install this release:</p> <table class="wysiwyg-macro" data-macro-name="info" data-macro-parameters="title=Groovy-Eclipse update site for Eclipse 3.7 and 3.6" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm86dGl0bGU9R3Jvb3Z5LUVjbGlwc2UgdXBkYXRlIHNpdGUgZm9yIEVjbGlwc2UgMy43IGFuZCAzLjZ9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"> <p>For Eclipse 3.7:<br /> <code><a href="http://dist.springsource.org/release/GRECLIPSE/e3.7/">http://dist.springsource.org/release/GRECLIPSE/e3.7/</a></code></p> <p>For Eclipse 3.6:<br /> <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> <p>If you want the Groovy 1.8 compiler, you must explicitly include it by checking the "Extra compilers" category.</p> <p>And a zipped version of the update site is available at:</p> <table class="wysiwyg-macro" data-macro-name="info" data-macro-parameters="title=Zipped Groovy-Eclipse update site for Eclipse 3.7 and 3.6" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm86dGl0bGU9WmlwcGVkIEdyb292eS1FY2xpcHNlIHVwZGF0ZSBzaXRlIGZvciBFY2xpcHNlIDMuNyBhbmQgMy42fQ&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"> <p>For Eclipse 3.7:<br /> <code><a href="http://dist.springsource.org/release/GRECLIPSE/e3.7/archive-2.6.0.xx-20111212-0900-e37-RELEASE.zip">http://dist.springsource.org/release/GRECLIPSE/e3.7/archive-2.6.0.xx-20111212-0900-e37-RELEASE.zip</a></code></p> <p>For Eclipse 3.6:<br /> <code><a href="http://dist.springsource.org/release/GRECLIPSE/e3.6/archive-2.6.0.xx-20111212-0800-e36-RELEASE.zip">http://dist.springsource.org/release/GRECLIPSE/e3.6/archive-2.6.0.xx-20111212-0800-e36-RELEASE.zip</a></code></p> <p>You can install from the zip by pointing your Eclipse update manager to the downloaded zip file and following the installation instructions.</p></td></tr></table> <h3>Outline</h3> <img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e3RvYzptYXhMZXZlbD00fGluZGVudD0yMHB4fHN0eWxlPWRpc2N8ZXhjbHVkZT1PdXRsaW5lfQ&locale=en_GB&version=2" data-macro-name="toc" data-macro-parameters="exclude=Outline|indent=20px|maxLevel=4|style=disc"> <h3>Search and refactoring</h3> <h4>Search and refactoring of generated getters, setters, and properties</h4> <p>Groovy-Eclipse now allows you to search for references to generated getters, setters and properties. For example, searching for references to a Groovy property (such as <code>age</code> in this example) will find all references to <code>getAge</code> and <code>setAge</code> in both Java and Groovy files:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/search1.png?version=1&modificationDate=1369175426607" data-image-src="/download/attachments/231079966/search1.png?version=1&modificationDate=1369175426607" data-linked-resource-id="231374903" data-linked-resource-type="attachment" data-linked-resource-default-alias="search1.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > search1.png"></p> <p>Similarly, references Java to getters and setters can be found inside of Groovy files even when they are referenced as properties. In this example, the class <code>Person</code> is defined in Java with explicit getters and setters. Searching for references on setAge will return references to the generated <code>age</code> property in the Groovy </p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/search2.png?version=1&modificationDate=1369175426591" data-image-src="/download/attachments/231079966/search2.png?version=1&modificationDate=1369175426591" data-linked-resource-id="231374902" data-linked-resource-type="attachment" data-linked-resource-default-alias="search2.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > search2.png"></p> <p>This also works for refactoring. As in the first example, when Person is defined as a Groovy class, we can rename <code>name</code> to <code>fullName</code> and the synthetic getters and setters will be renamed in both Java and Groovy files:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/refactor3.png?version=1&modificationDate=1369175426648" data-image-src="/download/attachments/231079966/refactor3.png?version=1&modificationDate=1369175426648" data-linked-resource-id="231374907" data-linked-resource-type="attachment" data-linked-resource-default-alias="refactor3.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > refactor3.png"></p> <p>Note that you will sometimes see warnings during refactoring like this:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/refactor4.png?version=1&modificationDate=1369175426646" data-image-src="/download/attachments/231079966/refactor4.png?version=1&modificationDate=1369175426646" data-linked-resource-id="231374906" data-linked-resource-type="attachment" data-linked-resource-default-alias="refactor4.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > refactor4.png"></p> <p>This warning comes about since some of the synthetic references in Java files cannot be determined to be precise by the Java search engine. By the nature of the language, refactoring of Groovy code can never be as precise as Java code is. It is always recommended to view the preview page before executing a refactoring.</p> <p>For more information on this feature, see issues <a href="http://jira.codehaus.org/browse/GRECLIPSE-1204">GRECLIPSE-1204</a>, <a href="http://jira.codehaus.org/browse/GRECLIPSE-1010">GRECLIPSE-1010</a>, and <a href="http://jira.codehaus.org/browse/GRECLIPSE-1205">GRECLIPSE-1205</a>.</p> <h4>Better default parameter support</h4> <p>For this release, we have done significant work with searching for and refactoring methods with default parameters. Now, searching for references to a method that has default parameters will locate all references to that method, regardless of how many parameters that reference uses:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/search5.png?version=1&modificationDate=1369175426582" data-image-src="/download/attachments/231079966/search5.png?version=1&modificationDate=1369175426582" data-linked-resource-id="231374901" data-linked-resource-type="attachment" data-linked-resource-default-alias="search5.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > search5.png"></p> <p>Similarly, rename refactor will correctly rename all references no matter how many parameters are used:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/refactor6.png?version=1&modificationDate=1369175426627" data-image-src="/download/attachments/231079966/refactor6.png?version=1&modificationDate=1369175426627" data-linked-resource-id="231374905" data-linked-resource-type="attachment" data-linked-resource-default-alias="refactor6.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > refactor6.png"></p> <p>For more information on this feature, see issues <a href="http://jira.codehaus.org/browse/GRECLIPSE-1255">GRECLIPSE-1255</a> and <a href="http://jira.codehaus.org/browse/GRECLIPSE-1233">GRECLIPSE-1233</a>.</p> <h4>Better extract local variable refactoring</h4> <p><em>Extract local variable</em> is now more precise as to where the variable is extracted to. Now, the variable is placed in the statement immediately preceding the variable's first use. See this example, where <code>map.one</code> is extracted to a variable and placed inside the enclosing closure.</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/refactor7.png?version=1&modificationDate=1369175426611" data-image-src="/download/attachments/231079966/refactor7.png?version=1&modificationDate=1369175426611" data-linked-resource-id="231374904" data-linked-resource-type="attachment" data-linked-resource-default-alias="refactor7.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > refactor7.png"></p> <p>See issue <a href="http://jira.codehaus.org/browse/GRECLIPSE-907">GRECLIPSE-907</a>.</p> <h3>Parser Recovery</h3> <p>Further recovery enhancements have been made to the Groovy Parser. This enables it to cope better with malformed code and that enables content assist to offer suggestions in more places than before. Here are a couple of examples of the 2.6.0 improvements:</p> <h4>When a trailing close paren is missing</h4> <p>These two situations show that correct content assist options are available even though there is a missing close paren:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/asc_recovery1.png?version=1&modificationDate=1369175426581" data-image-src="/download/attachments/231079966/asc_recovery1.png?version=1&modificationDate=1369175426581" data-linked-resource-id="231374900" data-linked-resource-type="attachment" data-linked-resource-default-alias="asc_recovery1.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > asc_recovery1.png"></p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/asc_recovery2.png?version=1&modificationDate=1369175426573" data-image-src="/download/attachments/231079966/asc_recovery2.png?version=1&modificationDate=1369175426573" data-linked-resource-id="231374899" data-linked-resource-type="attachment" data-linked-resource-default-alias="asc_recovery2.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > asc_recovery2.png"></p> <h4>When working on if conditions</h4> <p>It is now possible to work on <code>if</code> conditions without the then block {<code>...</code>} being defined </p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/asc_recoveryIf1.png?version=1&modificationDate=1369175426566" data-image-src="/download/attachments/231079966/asc_recoveryIf1.png?version=1&modificationDate=1369175426566" data-linked-resource-id="231374898" data-linked-resource-type="attachment" data-linked-resource-default-alias="asc_recoveryIf1.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > asc_recoveryIf1.png"></p> <p>It will even work if the trailing paren of the <code>if</code> condition isn't specified:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/asc_recoveryif2.png?version=1&modificationDate=1369175426543" data-image-src="/download/attachments/231079966/asc_recoveryif2.png?version=1&modificationDate=1369175426543" data-linked-resource-id="231374897" data-linked-resource-type="attachment" data-linked-resource-default-alias="asc_recoveryif2.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > asc_recoveryif2.png"></p> <h3>Content assist</h3> <h4>Suppressing default groovy methods (DGMs) from content assist</h4> <p>It is now possible to selectively suppress DGMs from cluttering content assist. There is a new Preferences -> Groovy -> Content Assist preferences page:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/preferences8.png?version=1&modificationDate=1369175426701" data-image-src="/download/attachments/231079966/preferences8.png?version=1&modificationDate=1369175426701" data-linked-resource-id="231374919" data-linked-resource-type="attachment" data-linked-resource-default-alias="preferences8.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > preferences8.png"></p> <p>This page contains a list of names of DGMs to be filtered from content assist. You can add and remove names individually by clicking on <em>New...</em> and <em>Remove</em>. Alternatively, you can edit the entire list at once by clicking on <em>Add multiple...</em>. This opens a dialog box with a multi-line text editor where you can easily add and remove multiple entries at once. See here:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/preferences9.png?version=1&modificationDate=1369175426699" data-image-src="/download/attachments/231079966/preferences9.png?version=1&modificationDate=1369175426699" data-linked-resource-id="231374918" data-linked-resource-type="attachment" data-linked-resource-default-alias="preferences9.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > preferences9.png"></p> <p>As expected, when in the editor, entries that have been suppressed no longer appear in content assist. In this case, <code>each</code> has been filtered, but <code>eachWithIndex</code> has not:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/contentassist10.png?version=1&modificationDate=1369175426714" data-image-src="/download/attachments/231079966/contentassist10.png?version=1&modificationDate=1369175426714" data-linked-resource-id="231374920" data-linked-resource-type="attachment" data-linked-resource-default-alias="contentassist10.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > contentassist10.png"></p> <p>For more information, see issue <a href="http://jira.codehaus.org/browse/GRECLIPSE-1182">GRECLIPSE-1182</a>.</p> <h4>Support for named arguments in constructors</h4> <p>When a Groovy class has no explicit constructor, it is possible to build an instance to the class using named arguments as described in <a class="confluence-link" href="/display/GROOVY/Groovy+Beans" data-linked-resource-id="2716" data-linked-resource-type="page" data-linked-resource-default-alias="Groovy Beans" data-base-url="http://docs.codehaus.org">Groovy Beans</a>. Groovy-Eclipse now provides content assist support for this kind of constructor call. In the following example code, performing content assist inside of the parens of the constructor call will bring up all remaining available </p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/constructor15.png?version=1&modificationDate=1369175426723" data-image-src="/download/attachments/231079966/constructor15.png?version=1&modificationDate=1369175426723" data-linked-resource-id="231374922" data-linked-resource-type="attachment" data-linked-resource-default-alias="constructor15.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > constructor15.png"></p> <p>And, like all parameters applied in content assist, Groovy-Eclipse guesses some likely values for the parameter:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/constructor16.png?version=1&modificationDate=1369175426715" data-image-src="/download/attachments/231079966/constructor16.png?version=1&modificationDate=1369175426715" data-linked-resource-id="231374921" data-linked-resource-type="attachment" data-linked-resource-default-alias="constructor16.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > constructor16.png"></p> <p>Note: named parameter content assist will only be available if there is no prefix. I.e., it will be available here:</p> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="java" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6amF2YX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> new Customer( /**/ ) </pre></td></tr></table> <p>but not here:</p> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="java" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6amF2YX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> new Customer(na/**/ ) </pre></td></tr></table> <p> (/**/ is the location where content assist is invoked)</p> <p>For more information, see <a href="http://jira.codehaus.org/browse/GRECLIPSE-1228">GRECLIPSE-1228</a>.</p> <h4>Better content assist for methods with closure arguments</h4> <p>When performing content assist on a method and the last parameter is a closure, the proposal will be applied with an opening curly "{", but no closing curly as here:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/closure11.png?version=1&modificationDate=1369175426729" data-image-src="/download/attachments/231079966/closure11.png?version=1&modificationDate=1369175426729" data-linked-resource-id="231374926" data-linked-resource-type="attachment" data-linked-resource-default-alias="closure11.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > closure11.png"></p> <p>As a user, you can choose to delete this and add your own content, or you can press enter and the closure will be completed for you:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/closure12.png?version=1&modificationDate=1369175426727" data-image-src="/download/attachments/231079966/closure12.png?version=1&modificationDate=1369175426727" data-linked-resource-id="231374925" data-linked-resource-type="attachment" data-linked-resource-default-alias="closure12.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > closure12.png"></p> <p>For more information, see issue <a href="http://jira.codehaus.org/browse/GRECLIPSE-1232">GRECLIPSE-1232</a>.</p> <h4>Better content assist in closures</h4> <p>When inside of a closure, methods defined in the enclosing class are now available in content assist (<a href="http://jira.codehaus.org/browse/GRECLIPSE-1114">GRECLIPSE-1114</a>):</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/closure13.png?version=1&modificationDate=1369175426726" data-image-src="/download/attachments/231079966/closure13.png?version=1&modificationDate=1369175426726" data-linked-resource-id="231374924" data-linked-resource-type="attachment" data-linked-resource-default-alias="closure13.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > closure13.png"></p> <p>Similarly, the fields <code>closure</code> and <code>owner</code> are now available in content assist when inside a closure (<a href="http://jira.codehaus.org/browse/GRECLIPSE-1267">GRECLIPSE-1267</a>):</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/closure14.png?version=1&modificationDate=1369175426725" data-image-src="/download/attachments/231079966/closure14.png?version=1&modificationDate=1369175426725" data-linked-resource-id="231374923" data-linked-resource-type="attachment" data-linked-resource-default-alias="closure14.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > closure14.png"></p> <h3>Quick fixes and Quick assists</h3> <p>Thanks to some help at a Groovy-Eclipse hackathon, we now have quite a few quick fixes and quick assists. Quick fixes are available based on a particular error marker in the editor. And quick assists are available based on the structure of the syntax tree.</p> <p>Both <em>quick fixes</em> and <em>quick assists</em> can be invoked by pressing <code>CTRL-1</code> (or <code>CMD-1</code> in Mac) on a selection in the editor.</p> <h4>Add unimplemented methods/Make class abstract Quick fixes</h4> <p>When a concrete base class implements an abstract super class with abstract methods, there are two quick fixes available:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/quickfix17.png?version=1&modificationDate=1369175426670" data-image-src="/download/attachments/231079966/quickfix17.png?version=1&modificationDate=1369175426670" data-linked-resource-id="231374911" data-linked-resource-type="attachment" data-linked-resource-default-alias="quickfix17.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > quickfix17.png"></p> <ul> <li>Make class abstract, which adds the "abstract" modifier to the sub-class</li> <li>Add unimplemented methods, which adds method stubs for all unimplemented methods, as shown here:</li> </ul> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/quickfix18.png?version=1&modificationDate=1369175426666" data-image-src="/download/attachments/231079966/quickfix18.png?version=1&modificationDate=1369175426666" data-linked-resource-id="231374910" data-linked-resource-type="attachment" data-linked-resource-default-alias="quickfix18.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > quickfix18.png"></p> <h4>Add groovy classpath container Quick fix</h4> <p>When errors like these are seen on the first line of the editor, it means that the Groovy libraries cannot be found:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/quickfix19.png?version=1&modificationDate=1369175426655" data-image-src="/download/attachments/231079966/quickfix19.png?version=1&modificationDate=1369175426655" data-linked-resource-id="231374909" data-linked-resource-type="attachment" data-linked-resource-default-alias="quickfix19.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > quickfix19.png"></p> <p>There is now a quickfix that will automatically add the Groovy classpath container to the project:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/quickfix20.png?version=1&modificationDate=1369175426653" data-image-src="/download/attachments/231079966/quickfix20.png?version=1&modificationDate=1369175426653" data-linked-resource-id="231374908" data-linked-resource-type="attachment" data-linked-resource-default-alias="quickfix20.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > quickfix20.png"></p> <h4>Convert to closure and convert to method quick assists</h4> <p>This pair of quick assists can be invoked when inside of a method or closure declaration (the closure declaration must be assigned to a field), and allows a quick conversion between the two.</p> <p>For example, this method declaration:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/quickassist21.png?version=1&modificationDate=1369175426695" data-image-src="/download/attachments/231079966/quickassist21.png?version=1&modificationDate=1369175426695" data-linked-resource-id="231374917" data-linked-resource-type="attachment" data-linked-resource-default-alias="quickassist21.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > quickassist21.png"></p> <p>is converted into this closure:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/quickassist22.png?version=1&modificationDate=1369175426688" data-image-src="/download/attachments/231079966/quickassist22.png?version=1&modificationDate=1369175426688" data-linked-resource-id="231374916" data-linked-resource-type="attachment" data-linked-resource-default-alias="quickassist22.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > quickassist22.png"></p> <p>And the closure can be converted back into the method declaration.</p> <h4>Convert to single line/multi line string</h4> <p>This pair of quick assists converts between single and multi line strings. When converting between string variants, newlines, tabs, etc are properly (un-)escaped.</p> <p>Here, a single line string is converted into a multiline string:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/quickassist23.png?version=1&modificationDate=1369175426680" data-image-src="/download/attachments/231079966/quickassist23.png?version=1&modificationDate=1369175426680" data-linked-resource-id="231374915" data-linked-resource-type="attachment" data-linked-resource-default-alias="quickassist23.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > quickassist23.png"></p> <p>And, it can be converted back:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/quickassist24.png?version=1&modificationDate=1369175426676" data-image-src="/download/attachments/231079966/quickassist24.png?version=1&modificationDate=1369175426676" data-linked-resource-id="231374914" data-linked-resource-type="attachment" data-linked-resource-default-alias="quickassist24.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > quickassist24.png"></p> <h4>Remove unnecessary semi-colons</h4> <p>This quick fix will remove all unnecessary semi-colons from a Groovy file. For example, this file:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/quickassist25.png?version=1&modificationDate=1369175426675" data-image-src="/download/attachments/231079966/quickassist25.png?version=1&modificationDate=1369175426675" data-linked-resource-id="231374913" data-linked-resource-type="attachment" data-linked-resource-default-alias="quickassist25.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > quickassist25.png"></p> <p>Will have all unnecessary semi-colons removed, but required ones will remain:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231079966/quickassist26.png?version=1&modificationDate=1369175426674" data-image-src="/download/attachments/231079966/quickassist26.png?version=1&modificationDate=1369175426674" data-linked-resource-id="231374912" data-linked-resource-type="attachment" data-linked-resource-default-alias="quickassist26.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079966" title="null > quickassist26.png"></p> <h3>Compiler Integration</h3> <h4>Groovy 1.8.4 support</h4> <p>Although Groovy-Eclipse still ships with the 1.7.10 compiler by default, 1.8.4 is available as an optional add-on. Groovy-Eclipse always ships with the compiler version that is compatible with the current production release of Grails. Since Grails 2.0 is not available in production yet, we do not ship the Groovy 1.8.x compiler by default.</p> <h4>Better Grab support</h4> <p>Groovy-Eclipse is careful to not allow AST transforms to run during reconciling. Reconciling is the special compile done on the editor contents whilst they are actively being worked on, prior to a save. AST transforms are prevented from running because they can damage source locations/etc that in turn damage other editor features (breaking search/refactoring/etc). However, in 2.6.0 the Grab transformation is being allowed to run since it doesn't modify the code structure but instead just pulls in jars to be on the compilation classpath. This should mean that when working on scripts/etc that are Grab'ing dependencies, there should be no errors in the editor view.</p> <h4>More binary dependencies</h4> <p>The Groovy-Eclipse classpath container now includes the ivy, jline, and bsf jars by default. Even thought these libraries are not typically used directly in user code, including them on the classpath will help with searching for binary references. See <a href="http://jira.codehaus.org/browse/GRECLIPSE-1211">GRECLIPSE-1211</a>.</p> <h3>Maven integration </h3> <p>There is now better ordering on the Java classpath of Groovy source folders when importing maven projects that user Groovy into Eclipse and STS. See <a href="http://jira.codehaus.org/browse/GRECLIPSE-1222">GRECLIPSE-1222</a>.</p> <p>Also, we have updated the <a class="confluence-link" href="/display/GROOVY/Groovy-Eclipse+compiler+plugin+for+Maven" data-linked-resource-id="193888332" data-linked-resource-type="page" data-linked-resource-default-alias="Groovy-Eclipse compiler plugin for Maven" data-base-url="http://docs.codehaus.org">Groovy-Eclipse compiler plugin for Maven</a> docs to be explicit about how to configure your extra source folders.</p> <h3>Compatibility</h3> <p>Groovy-Eclipse 2.6.0 includes Groovy 1.7.10 by default. <a class="confluence-link" href="/display/GROOVY/Compiler+Switching+within+Groovy-Eclipse" data-linked-resource-id="133923519" data-linked-resource-type="page" data-linked-resource-default-alias="Compiler Switching within Groovy-Eclipse" data-base-url="http://docs.codehaus.org">Groovy 1.8.4 can be optionally installed.</a> This version of Groovy-Eclipse is recommended to be installed on STS 2.8.1 or 2.9.0.M1, Eclipse 3.7.1 or 3.6.2. There are different update sites for Groovy-Eclipse targeting Eclipse 3.6 and 3.7 (see above).</p> <h3>Bug fixes</h3> <p>We have fixed over 70 bugs for this release. See the details on our <a href="http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&jqlQuery=project+%3D+GRECLIPSE+AND+fixVersion+%3D+17849+AND+status+in+%28Resolved%2C+Closed%29+ORDER+BY+priority+DESC">issue tracker</a>.</p> <h3>Shout outs</h3> <p>We had a successful <a href="http://contraptionsforprogramming.blogspot.com/2011/11/first-ever-vancouver-eclipse.html">Eclipse hackathon</a> this November in Vancouver, B.C. and we received a number of quality patches from external contributors:</p> <ul> <li>Renato Garcia on <a href="http://jira.codehaus.org/browse/GRECLIPSE-1269">GRECLIPSE-1269</a>, GRECLIPSE-1250http://jira.codehaus.org/browse/GRECLIPSE-1250</li> <li>Adrian Kuhn on <a href="http://jira.codehaus.org/browse/GRECLIPSE-1255">GRECLIPSE-1255</a></li> <li>Nick Sawadsky on <a href="http://jira.codehaus.org/browse/GRECLIPSE-1252">GRECLIPSE-1252</a></li> <li>Curtis on <a href="http://jira.codehaus.org/browse/GRECLIPSE-1848">GRECLIPSE-848</a></li> </ul> <p>Thanks for your work. And of course, thank you to everyone else who contributed in other ways by raising bugs on jira or asking questions on the mailing lists.</p> <h3>What's next?</h3> <p>We are tentatively planning a 2.6.1 release in February. You can take a look at all issues we are <a href="http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&jqlQuery=project+%3D+GRECLIPSE+AND+resolution+%3D+Unresolved+AND+fixVersion+%3D+%222.6.1.Release%22+ORDER+BY+priority+DESC&mode=hide">planning to fix for this release</a>.</p> <p>We appreciate all 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 would like to see), please raise them in our <a href="http://jira.codehaus.org/browse/GRECLIPSE">issue tracker</a>. If there is an existing bug fix or enhancement that you require are not seeing any movement on, please make some noise on it (and get your friends to do the same). We respond to community feedback, and we can make the most improvements to Groovy-Eclipse when we hear directly from the community. So, please speak up!</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