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
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>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.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> <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.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.2.xx-20110310-1500-e36.zip">http://dist.springsource.org/release/GRECLIPSE/e3.6/archive-2.1.2.xx-20110310-1500-e36.zip</a></code></p></td></tr></table> <p>You can install from the zip by pointing your Eclipse update manager to the downloaded zip file and following the installation instructions.</p> <p>Snapshot versions targeting Eclipse 3.7 are available. Our 3.7 support is in beta. Although largely working, some functionality may be missing or buggy. You can access the 3.7 update site here:</p> <table class="wysiwyg-macro" data-macro-name="info" data-macro-parameters="title=Groovy-Eclipse snapshot update site targeting Eclipse 3.7" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm86dGl0bGU9R3Jvb3Z5LUVjbGlwc2Ugc25hcHNob3QgdXBkYXRlIHNpdGUgdGFyZ2V0aW5nIEVjbGlwc2UgMy43fQ&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.codehaus.org/groovy/distributions/greclipse/snapshot/e3.7/">http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.7/</a></code></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>Find occurrences in groovy files (CTRL-Shift-U)</h3> <p>Typing CTRL-Shift-U (or CMD-Shift-U on Macs) in a Groovy editor when selecting an identifier will search for all occurrences of that identifier:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/230400686/find_occurrences.png?version=1&modificationDate=1368951644306" data-image-src="/download/attachments/230400686/find_occurrences.png?version=1&modificationDate=1368951644306" data-linked-resource-id="230565108" data-linked-resource-type="attachment" data-linked-resource-default-alias="find_occurrences.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400686" title="null > find_occurrences.png"></p> <p>Above, notice how only references to the <code>val</code> property are highlighted. Other references with the same name are not highlighted.</p> <h3>Mark occurrences</h3> <p>If the feature is enabled in your workspace for Java Editors, then when selecting an identifier all references to that identifier will be marked (no need to explicitly press CTRL+Shift+U, but the results will not appear in the search view). The coloring is slightly different from find occurrences, as you can see in the following screenshot:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/230400686/mark_occurrences.png?version=1&modificationDate=1368951644305" data-image-src="/download/attachments/230400686/mark_occurrences.png?version=1&modificationDate=1368951644305" data-linked-resource-id="230565107" data-linked-resource-type="attachment" data-linked-resource-default-alias="mark_occurrences.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400686" title="null > mark_occurrences.png"></p> <p>In the screenshot above, a reference to the <code>doOperation</code> closure field currently has the carat and the declaration plus all references are selected. This does not affect the previous search results as you can see.</p> <p>This behavior is similar to that of the Java editor. In fact, mark occurrences in Groovy editors can be configured in the Java Editor mark occurrences preference page:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/230400686/mark_occurrences_preferences.png?version=1&modificationDate=1368951644293" data-image-src="/download/attachments/230400686/mark_occurrences_preferences.png?version=1&modificationDate=1368951644293" data-linked-resource-id="230565106" data-linked-resource-type="attachment" data-linked-resource-default-alias="mark_occurrences_preferences.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400686" title="null > mark_occurrences_preferences.png"></p> <p>Note that, the Groovy editor does not support all the variants of mark occurrences that the Java editor does. It is either enabled completely or disabled completely, which is toggled by selecting <em>Mark occurrences of the selected element in the current file</em>.</p> <h3>Inline renaming</h3> <p>The Groovy editor now supports inline renaming, just like the Java editor. If the preference is set, all calls to <em>Rename Refactor</em> inside the editor will rename the variables inline:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/230400686/inline_rename.png?version=1&modificationDate=1368951644285" data-image-src="/download/attachments/230400686/inline_rename.png?version=1&modificationDate=1368951644285" data-linked-resource-id="230565105" data-linked-resource-type="attachment" data-linked-resource-default-alias="inline_rename.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400686" title="null > inline_rename.png"></p> <h3>Improved syntax highlighting</h3> <p>Deprecated declarations and references are now highlighted with a strikethrough:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/230400686/deprecated.png?version=1&modificationDate=1368951644281" data-image-src="/download/attachments/230400686/deprecated.png?version=1&modificationDate=1368951644281" data-linked-resource-id="230565104" data-linked-resource-type="attachment" data-linked-resource-default-alias="deprecated.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400686" title="null > deprecated.png"></p> <p>Field and method references are highlighted too, if the preference is set:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/230400686/method_field_highlighting.png?version=1&modificationDate=1368951644276" data-image-src="/download/attachments/230400686/method_field_highlighting.png?version=1&modificationDate=1368951644276" data-linked-resource-id="230565103" data-linked-resource-type="attachment" data-linked-resource-default-alias="method_field_highlighting.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400686" title="null > method_field_highlighting.png"></p> <p>Method, field, and deprecation highlighting preferences are borrowed from Java and so they can be configured on the Java syntax highlighting page:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/230400686/coloring_preferences_java.png?version=1&modificationDate=1368951644267" data-image-src="/download/attachments/230400686/coloring_preferences_java.png?version=1&modificationDate=1368951644267" data-linked-resource-id="230565102" data-linked-resource-type="attachment" data-linked-resource-default-alias="coloring_preferences_java.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400686" title="null > coloring_preferences_java.png"></p> <p>Additionally, we have reworked the Groovy Editor preferences page so that there are more syntax highlighting options. Now, it is possible to highlight the <code>return</code> keyword separately as well as operators:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/230400686/colors_colors.png?version=1&modificationDate=1368951644239" data-image-src="/download/attachments/230400686/colors_colors.png?version=1&modificationDate=1368951644239" data-linked-resource-id="230565101" data-linked-resource-type="attachment" data-linked-resource-default-alias="colors_colors.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400686" title="null > colors_colors.png"></p> <p>Yes. Your Groovy editor can now be made to be very pretty. Explore the <code>Preferences -> Groovy -> Editor</code> preferences page for a full list of what can be changed and more options for customization.</p> <h3>Better type inferencing for closures inside DGM calls</h3> <p>Standard Default Groovy Method calls like <code>each</code>, <code>collect</code>, <code>find</code>, etc are recognized by the inferencing engine and their associated closure parameter type is inferred from the type of the collection being iterated over (if it is known). For example, in the following screenshot the collection is of type <code>List<String></code>, and so we can infer that the type of <code>it</code> is <code>String</code>:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/230400686/dgm_inferencing.png?version=1&modificationDate=1368951644209" data-image-src="/download/attachments/230400686/dgm_inferencing.png?version=1&modificationDate=1368951644209" data-linked-resource-id="230565098" data-linked-resource-type="attachment" data-linked-resource-default-alias="dgm_inferencing.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400686" title="null > dgm_inferencing.png"></p> <h3>Basic support for Groovy++</h3> <p>This version of Groovy-Eclipse allows usage of the Groovy++ Ast transforms. Simply grab a version of groovy++ from <a href="http://code.google.com/p/groovypptest/">the Groovy++ project page</a>, for example: <a href="http://code.google.com/p/groovypptest/downloads/detail?name=groovypp-0.4.170.jar&can=2&q=">groovypp-0.4.170.jar</a> and place the jar on your project classpath. With that in place you can start using static resolution by marking your code with <code>@Typed</code>. For examples see the <a href="http://code.google.com/p/groovypptest/wiki/Welcome">Groovy++ documentation</a>.</p> <h3>Timers for AST Transform operations now shown in Groovy Event Console</h3> <p>The <em>Groovy Event Console</em> is available from the console view. To activate it, click on the <em>Open Console</em> button:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/230400686/event_console.png?version=1&modificationDate=1368951644308" data-image-src="/download/attachments/230400686/event_console.png?version=1&modificationDate=1368951644308" data-linked-resource-id="230565109" data-linked-resource-type="attachment" data-linked-resource-default-alias="event_console.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400686" title="null > event_console.png"></p> <p>Now, interesting Groovy-Eclipse events will be logged to the console view, including information about AST Transforms. Global AST transforms will only be shown if they take more than 0ms to run, to try and reduce unnecessary entries in the console. <strong>Please note:</strong> the event console is meant for debugging and diagnostics. It may degrade the performance of Groovy-Eclipse if it is open.</p> <h3>Now includes Groovy 1.7.8</h3> <p>The Groovy compiler for Groovy-Eclipse is 1.7.8. We will be releasing 1.8 support shortly.</p> <h3>Better ordering for Quick fixes and content assist</h3> <p>Suggested types to import in both quick fix and content assist are now ordered based on various criteria so that more common types will be found towards the top of the list. Types imported from <code>java.*</code>, <code>groovy.*</code>, <code>groovyx.*</code>, and <code>javax.*</code> have higher priority, in that order, than types from other packages as seen in this screen shot where the type <code>ExtendedList</code> is being imported:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/230400686/quickfixorder1.jpg?version=1&modificationDate=1368951644325" data-image-src="/download/attachments/230400686/quickfixorder1.jpg?version=1&modificationDate=1368951644325" data-linked-resource-id="230565111" data-linked-resource-type="attachment" data-linked-resource-default-alias="quickfixorder1.jpg" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400686" title="null > quickfixorder1.jpg"></p> <p>However, if importing types from similarly named packages as well as types declared in the same top level type like a private nested type, the private nested type has higher precedence, followed by public types from similarly named packages, followed by types from <code>java.*</code>, <code>groovy.*</code>, <code>groovyx.*</code>, and <code>javax.*</code>, and finally types from other packages. The following screen shows the private type <code>ExtendedList</code> appearing first in the content assist suggestion, followed by a type from a similarly named package, followed by the remaining suggestions:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/230400686/contentassist.jpg?version=1&modificationDate=1368951644317" data-image-src="/download/attachments/230400686/contentassist.jpg?version=1&modificationDate=1368951644317" data-linked-resource-id="230565110" data-linked-resource-type="attachment" data-linked-resource-default-alias="contentassist.jpg" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400686" title="null > contentassist.jpg"></p> <h3>Type inferencing for getAt</h3> <p>Custom <code>getAt(String)</code> methods will now be used to feed the inferencing engine when using '[ ]'. For example:</p> <p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/230400686/getAt.png?version=1&modificationDate=1368951644331" data-image-src="/download/attachments/230400686/getAt.png?version=1&modificationDate=1368951644331" data-linked-resource-id="230565112" data-linked-resource-type="attachment" data-linked-resource-default-alias="getAt.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400686" title="null > getAt.png"></p> <p>In the preceeding code, notice how the reference to the <code>name</code> field is correctly resolved to be coming from the MyTree class. The inferencing engine realizes that the use of the '[ ]' corresponds to an invocation of the <code>getAt</code> method.</p> <h3>Better unicode support</h3> <p>Unicode escape sequences (e.g., <code>\uE096</code>) now have correct offsets and lengths in the parse tree, so you can use unicode escape sequences freely in your Groovy code and source locations in your file will not be corrupted.</p> <h3>Performance improvements</h3> <p>We have made several performance enhancements for the 2.1.2 release, below are the two most notable ones. They primarily target content assist.</p> <h5>Code assist performance has been improved</h5> <p>Type resolution is now lazier. During code assist we don't actively chase down (resolve) property accessor type references unless necessary.</p> <h5>Speedier type inferencing</h5> <p>Where appropriate, the inferencing engine will not visit the entire file to determine the type of a single expression. Rather, it will prune the branches of the AST and only visit the method or field declaration that contains the expression to be inferred. This has a noticeable affect on content assist invocation speeds.</p> <h3>Optional non-jar locking behaviour on Windows</h3> <p>On windows there is now an option to try and avoid Groovy-Eclipse locking jars and preventing them from being updated (or removed, in the case of attempting to uninstall a plugin in a grails project). Specify the system property -Dgreclipse.nonlocking=true when starting Eclipse/STS to activate the use of non locking classloaders. If no problems come up over the next few releases this may be made the default mode of operation. Locks should also be released (regardless of that system property setting) if the offending project is closed.</p> <h3>Headless Groovy-Eclipse feature</h3> <p>Those who wish to install Groovy-Eclipse without any UI components can do so from the update site. The feature id is <code>org.codehaus.groovy.headless.feature</code>. This is primarily useful for those who are performing headless builds using <a href="http://eclipse.org/pde">PDE</a> or <a href="http://eclipse.org/">Buckminster</a>. Note that this feature is <em>uncategorized</em> in the update site, so under normal circumstances you will not see it in Eclipse's Update Manager. However, if you <em>uncheck</em> "Group items by category", you will see the feature.</p> <p>For more information, see <a href="http://jira.codehaus.org/browse/GRECLIPSE-716">GRECLIPSE-716</a>.</p> <h3>Compatibility</h3> <p>Groovy-Eclipse 2.1.2 includes Groovy 1.7.8 and is installable on STS 2.6.0, Eclipse 3.6.0, 3.6.1, or 3.6.2. Snapshot builds targeting Eclipse 3.7 are available as well. See above for the update site.</p> <h3>Bug fixes</h3> <p>Over <a href="http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&jqlQuery=project+%3D+GRECLIPSE+AND+fixVersion+in+%28%222.1.2RC1%22%2C+%222.1.2Release%22%29+AND+status+in+%28Resolved%2C+Closed%29">50 issues</a> have been fixed for this release.</p> <h3>What's next?</h3> <p>The 2.2.0 final release is scheduled for the end of June, around the time that Eclipse 3.7 will be released. We will consider a 2.1.3 release that includes Groovy 1.8 support.</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 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, but we can only do so when we hear from the community.</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