Skip to content

Legacy Release Notes

Eric Milles edited this page Sep 30, 2024 · 16 revisions

4.6.0

Greclipse 4.6.0 was released on June 30th 2022.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 4.0.3
  • Groovy 3.0.11
  • Groovy 2.5.17

Note: Support for Groovy 2.5.0, 2.5.1 and 2.5.2 has been dropped.

The new antlr4-based Parrot Parser is disabled by default. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4(). Please note that parser recovery is not implemented for the Parrot Parser, so your editing experience may be sub-par in this mode.

Support for new version of Eclipse

  • Eclipse 4.24 (2022-06)

Support for Java 18

As of Eclipse 4.24, Java 18 is supported. It can be combined with Groovy 4.

Compiler Fixes

Content Assist

  • annotation attribute completion proposals for meta-annotations

  • disambiguation import retained in presence of star imports

  • rename package includes star import

Syntax Highlighting and Type Inferencing

  • closure/lambda parameter(s) when SAM is not declared directly

    Current:

    Previous:

  • outer class type parameter references

    Current:

    Previous:

  • Object methods on Class variables

    Current:

    Previous:

  • bean-style reference to interface default method

    Current:

    Previous:

  • closure/lambda parameters of return expression

    Current:

    Previous:

  • multi-catch parameter

    Current:

    Previous:

  • inherited trait properties

    trait A {
      def p
    }
    trait B extends A {
    }
    class C implements B {
      // "p" should be visible
    }

Resolved Issues

  • 1351: Add support for Eclipse 4.24 (2022-06)
  • 1352: Add support for Java 18
  • 1354: Compilation error "type Proxy is ambiguous"
  • 1355: Add annotation attribute completion proposals for meta-annotations
  • 1356: Add support for Groovy 4.0.2
  • 1357: Rename of package does not rename star import
  • 1360: Compilation error in Greclipse (not with groovyc/Gradle)
  • 1361: Eclipse does not see inherited trait properties
  • 1365: Add support for Groovy 4.0.3
  • 1366: Add support for Groovy 3.0.11
  • 1367: Add support for Groovy 2.5.17
  • 1368: Fix type inferencing for closure/lambda parameter(s) when SAM is not declared directly
  • 1369: Fix type inferencing for outer class type parameter references
  • 1371: Fix syntax highlighting for Object methods on Class variables
  • 1372: Fix type inferencing and syntax highlighting for bean-style reference to interface default method
  • 1373: Fix type inferencing for closure/lambda parameters of return expression
  • 1374: Fix code hover and navigation for multi-catch parameter

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

4.5.0

Greclipse 4.5.0 was released on March 31st 2022.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 4.0.1
  • Groovy 3.0.10
  • Groovy 2.5.16

The new antlr4-based Parrot Parser is disabled by default. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4(). Please note that parser recovery is not implemented for the Parrot Parser, so your editing experience may be sub-par in this mode.

Support for new version of Eclipse

  • Eclipse 4.23 (2022-03)

Compiler Fixes

Content Assist

  • range of untyped field/property/method/parameter: def m(p) {...}

  • range of type parameters and primitives: class C<T, U extends T>

  • Organize Imports for class with self-referential type parameter

  • warnings (in addition to errors) in Groovy Event Console

  • static and object initializer folding

Current Previous

Syntax Highlighting and Type Inferencing

  • assignments in map-based types
Current Previous
  • super interface methods

    Current:

    Previous:

  • each and eachWithIndex extension methods

    Current:

    Previous:

  • extension method that overloads declared method(s)

    Current:

    Previous:

  • @Category method this and super within gstring

    Current:

    Previous:

  • statements in deprecated class

    Current:

    Previous:

Resolved Issues

  • 1331: Fix type inferencing and syntax highlighting for assignments in map-based types
  • 1332: Add support for Eclipse 4.23 (2022-03)
  • 1335: Fix type inferencing, syntax highlighting and code navigation for extension method that overloads declared method(s)
  • 1336: Fix type inferencing and syntax highlighting for @Category method this and super within gstring
  • 1337: Fix syntax highlighting for statements in deprecated class
  • 1339: Fix type inferencing for each and eachWithIndex extension methods
  • 1340: Support annotation attribute with array class literal
  • 1341: Add support for Groovy 4.0.0
  • 1342: Stack overflow during Organize Imports for class with self-referential type parameter
  • 1343: Fix static and object initializer folding
  • 1344: Fix type inferencing, syntax highlighting and content assist for super interface methods
  • 1346: Add support for Groovy 4.0.1
  • 1347: Add support for Groovy 3.0.10
  • 1348: Add support for Groovy 2.5.16
  • 1349: STC: NullPointerException for raw type guard followed by parameterized method call
  • 1353: Compiler creates different byte code on Linux vs Windows/MacOS

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

4.4.0

Greclipse 4.4.0 was released on December 31st 2021.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 4.0rc2

The new antlr4-based Parrot Parser is disabled by default. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4(). Please note that parser recovery is not implemented for the Parrot Parser, so your editing experience may be sub-par in this mode.

Support for new version of Eclipse

  • Eclipse 4.22 (2021-12)

Support for Java 17

As of Eclipse 4.22, Java 17 is supported. It can be combined with Groovy 3 (or greater).

Support for Record types in New Groovy Type wizard

Launch Config classpath refresh

Run As > Groovy Script (or Console or Shell) picks up changes to the project's classpath for an existing launch config. Previously you would be required to manually delete the launch config to achieve the same result.

Compiler Fixes

Content Assist

  • Format Source (Ctrl+Shift+F) curly brace handling in the presence of single-line comment(s)

  • Organize Imports (Ctrl+Shift+O) title-case variables handling

Syntax Highlighting and Type Inferencing

  • yield within switch expression

    Current:

    Previous:

  • sealed, non-sealed and permits restricted identifiers

    Current:

    Previous:

  • compact constructor component references

    Current:

    Previous:

  • compact constructor folding control

    Current:

    Previous:

  • constructor and static metaclass properties

    Current:

    Previous:

  • implicit constructor call of static inner class

    Current:

    Previous:

  • static import of callable property

    Current:

    Previous:

  • this.name within map-based type

    Current:

    Previous:

Resolved Issues

  • 1299: Run as Groovy Script does not refresh classpath of existing launch config
  • 1300: "refers to the missing type" error in Greclipse (not Groovy)
  • 1302: Add support for Eclipse 4.22 (2021-12)
  • 1303: Add support for Java 17
  • 1304: Fix syntax highlighting for yield within switch expression
  • 1305: Fix syntax highlighting for sealed, non-sealed and permits restricted identifiers
  • 1306: Fix type inferencing and syntax highlighting for constructor and static metaclass properties
  • 1307: Fix syntax highlighting for implicit constructor call of static inner class
  • 1309: Fix type inferencing, syntax highlighting and import organization for static import of callable property
  • 1311: Fix type inferencing and syntax highlighting for this.name within map-based type
  • 1313: Add support for Groovy 4.0b2
  • 1314: Add support of JDK17 for groovy-eclipse-compiler
  • 1315: Add support for Groovy 4.0rc1
  • 1316: Add record support to New Groovy Type wizard
  • 1317: Organize Imports reports missing type for title-case variables
  • 1318: Formatter - curly bracket is not moved to same line
  • 1320: Elvis assignment causes stack overflow in editor
  • 1324: Add support for Groovy 4.0rc2
  • 1325: Fix type inferencing and syntax highlighting for compact constructor component references
  • 1327: Static type checking fails in Greclipse within closure (closure declared argument types ignored)
  • 1328: Fix folding and syntax highlighting for compact constructor

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

4.3.0

Greclipse 4.3.0 was released on September 30th 2021.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 4.0b1
  • Groovy 3.0.9
  • Groovy 2.5.15

The new antlr4-based Parrot Parser is disabled by default. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4(). Please note that parser recovery is not implemented for the Parrot Parser, so your editing experience may be sub-par in this mode.

Support for new version of Eclipse

  • Eclipse 4.21 (2021-09)

Compatibility Improvements

Compiler Fixes

Content Assist

  • "Replace method call with property expression" supports setter with named argument

  • "Replace method call with property expression" inserts qualifier to maintain semantics of property

Syntax Highlighting and Type Inferencing

  • [Bb]oolean properties

    • "is" method is preferred over "get" method for boolean
    • "is" mehtod is not considered accessor for Boolean -- GROOVY-10133
    • "super.name" is hard-wired to "get" method for boolean -- GROOVY-6097
  • dynamic closure parameter

    Current:

    Previous:

  • method call with Map delegate

    Current:

    Previous:

  • instanceof and parameterized types

    Current:

    Previous:

Resolved Issues

  • 1275: Groovy-Eclipse 4.2.0 <-> m2e console
  • 1276: Add support for Eclipse 4.21 (2021-09)
  • 1277: Fix type inferencing, syntax highlighting and code navigation for method call with Map delegate
  • 1278: Quick Assist "Replace method call with property expression" does not work on setter with named argument(s)
  • 1281: Type inferencing error (only in Eclipse, not in groovyc)
  • 1282: Fix type inferencing for dynamic closure parameter
  • 1283: NullPointerException on Remote Project
  • 1286: Can't install groovy-eclipse and web-developer tools at the same time
  • 1288: Quick Assist "Replace method call with property expression" inserts qualifier to maintain semantics of property
  • 1289: Improve support for BigDecimal and BigInteger
  • 1295: Add support for Groovy 2.5.15
  • 1296: Add support for Groovy 3.0.9
  • 1297: Add support for Groovy 4.0b1

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

4.2.0

Greclipse 4.2.0 was released on June 30th 2021.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 4.0a3
  • Groovy 3.0.8

The new antlr4-based Parrot Parser is disabled by default. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4(). Please note that parser recovery is not implemented for the Parrot Parser, so your editing experience may be sub-par in this mode.

Support for new version of Eclipse

  • Eclipse 4.20 (2021-06)

Support for Java 16

As of Eclipse 4.20, Java 16 is supported. It can be combined with Groovy 3 (or greater).

Conflict with logback-classic raised during installation

When installing Groovy Development Tools, you may now be presented with this dialog:

image

If you choose to proceed, the resulting eclipse install should not have an issue with multiple Groovy Compiler bundles.

Compiler Fixes

Content Assist

  • auto-complete template for def keyword

  • method completion proposals vs. method context proposals

    Current:

    Previous:

  • editor support for dynamic property syntax

    a.(b.c()) is a lesser-used style where the name of the property is determined by the evaluation of the expression b.c(). Quick fixes and refactorings were failing due to the assumption that a property expression is a sequence of constant expressions.

  • Groovy Console and Groovy Shell errors for Groovy 3 and 4

    Current:

    Previous:

  • Organize Imports keeps static imports for default-package types

  • Organize Imports keeps static imports for unknown types

Syntax Highlighting and Type Inferencing

  • multi-catch types

    Current:

    Previous:

  • property name beginning with $

  • non-delegated method

    Current:

    Previous:

  • variadic category methods

    Current:

    Previous:

  • non-public methods in category class

    Current:

    Previous:

  • super reference to primitive boolean property

    Current:

    Previous:

  • static methods and properties that hide Class members

    Current:

    Previous:

  • method call with too few type arguments

    Current:

    Previous:

  • unresolved type parameter in method return type

    Current:

    Previous:

  • use method call with at least one argument plus a trailing closure

    Current:

    Previous:

Resolved Issues

  • 1231: Compile error - No such class: jdk.Profile+Annotation
  • 1233: Add support for Eclipse 4.20 (2021-06)
  • 1234: Add support for Java 16
  • 1240: Fix type inferencing and syntax highlighting for use method call with at least one argument plus a trailing closure
  • 1241: Parrot Parser: GroovyCastException for multi-dimensional array initializer
  • 1242: Difference in method completion proposals versus method context proposals
  • 1243: Organize imports drops static imports of unknown types
  • 1244: Organize imports drops static imports for default-package types
  • 1245: Add support for Groovy 4.0.0-alpha-3
  • 1246: Add support for Groovy 3.0.8
  • 1247: SC: Fix code select for property name beginning with $
  • 1249: ArrayIndexOutOfBoundsException for method call with too few type arguments
  • 1253: ClassCastException in groovy editor for dynamic property syntax
  • 1255: Add autocomplete support for def keyword
  • 1256: Fix type inferencing and syntax highlighting for non-public methods in category class
  • 1257: Fix type inferencing and syntax highlighting for static methods and properties that hide Class members
  • 1260: Groovy Console and Groovy Shell errors for Groovy 3 and 4
  • 1262: Fix type inferencing and code navigation for non-delegated method
  • 1265: Fix type inferencing, syntax highlighting and code navigation for variadic category methods
  • 1266: Fix type inferencing and syntax highlighting for unresolved type parameter in method return type
  • 1267: Groovy-Eclipse sees trait as interface and urges to implement its methods
  • 1268: Groovy compiler error: exception in phase 'semantic analysis' in source unit 'xxx.groovy' unexpected NullPointerException
  • 1269: Fix type inferencing and syntax highlighting for super reference to primitive boolean property
  • 1273: Fix type inferencing and code navigation for multi-catch types

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

4.1.0

Greclipse 4.1.0 was released on March 31st 2021.

New and Noteworthy

Support for new version of Eclipse

  • Eclipse 4.19 (2021-03)

Compiler Fixes

Code Formatter

  • expect checks (Spock)

  • if, for and while blocks

Syntax Highlighting and Type Inferencing

  • general property access

    Current:

    Previous:

  • method with recursive generics

    Hovering over comparing failed to display javadoc due to error in binding key for static <T, U extends Comparable<? super U>> Comparator<T> comparing(Function<? super T, ? extends U>).

  • method call with complex argument expression

    Current:

    Previous:

  • interface default method with overload(s)

    Current:

    Previous:

  • unresolvable type parameter(s)

    Current:

    Previous:

Resolved Issues

  • 903: Global AST Transforms from test dependencies should not be applied to main sources
  • 1213: Fix code hover for methods with recursive generics
  • 1214: Fix type inferencing, syntax highlighting and code navigation for method call with complex argument expression
  • 1216: Non-cosmetic failures using @TupleConstructor on nested class
  • 1217: Add support for Eclipse 4.19 (2021-03)
  • 1219: Formatting spock test damages the file
  • 1220: Fix type inferencing and code navigation for interface default method with overload(s)
  • 1221: Formatter ignores indent for if, for, while expressions
  • 1226: Fix type inferencing for method with unresolvable type parameter(s)
  • 1230: Fix type inferencing and syntax highlighting of general property access

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

4.0.0

Greclipse 4.0.0 was released on December 31st 2020.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 4.0a2 new
  • Groovy 3.0.7
  • Groovy 2.5.14

Note: Support for Groovy 2.4 has been dropped.

The new antlr4-based Parrot Parser is disabled by default for Groovy 3+. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4(). Please note that parser recovery is not implemented for the Parrot Parser, so your editing experience may be sub-par in this mode.

Support for new version of Eclipse

  • Eclipse 4.18 (2020-12)

Support for Java 15

As of Eclipse 4.18, Java 15 is supported. It can be combined with Groovy 3 (or greater).

Note: Support for Java 7 (and below) has been dropped.

Groovy AST Viewer

Toolbar buttons for focusing on part of the tree have been restored. Linking with the active editor has been fixed. Labels have been made more consistent. And "has" methods are now shown like "is" properties.

Compiler Fixes

Content Assist

  • code hover for type disjunction

  • code hover for static method with type parameter(s) in class with type parameter(s)

  • code hover for single-character identifier at start of script

    Current:

    Previous:

  • invalid method references

    Current:

    Previous:

  • organize imports for inner class of super class

    package p
    import p.A.B
    
    abstract class A {
      protected static class B {
      }
    }
    
    class C extends A {
      def m(B b) {
      }
    }

    Ctrl+Shift+O now removes the spurious import statement.

  • Quick Assist "Add Import" (Ctrl+Shift+M) fixed for script outside of project source folder

  • Quick Assist "Convert Accessor call to Property read/write" (Ctrl+Shift+,) fixed for script outside of project source folder

Syntax Highlighting and Type Inferencing

  • class that indirectly implements Map

    Current:

    Previous:

  • static reference to extension method

    Current:

    Previous:

  • method references as method call arguments

    Current:

    Previous:

  • expression lambda expression

    Current:

    Previous:

  • generic method assignment

    Current:

    Previous:

  • switch case closure parameter

    Current:

    Previous:

  • @AutoImplement code block

    Current:

    Previous:

  • @BaseScript references

    Current:

    Previous:

Resolved Issues

  • 1161: Add support for Eclipse 4.18 (2020-12)
  • 1162: Add support for Java 15
  • 1167: JDK 14 + preview-features not working correctly
  • 1169: Fix code hover for single-character identifier at start of script
  • 1170: Fix code hover for type disjunction
  • 1184: Fix organize imports for inner class of super class
  • 1186: Groovy AST Viewer unlinks from active editor when other views gain focus
  • 1187: Groovy AST Viewer displays inconsistent labels and types
  • 1189: Fix type inferencing for class that indirectly implements Map
  • 1190: Hover help/intellisense broken with @BaseScript
  • 1191: SC: invalid method reference produces NPE
  • 1192: Fix type inferencing, syntax highlighting, code navigation and content assist for static reference to extension method
  • 1194: Fix type inferencing and syntax highlighting for method references as method call arguments
  • 1195: Fix code hover for static method with type parameter(s) in class with type parameter(s)
  • 1197: Fix type inferencing, syntax highlighting and code navigation for AutoImplement code block
  • 1198: Fix type inferencing for expression lambda expression
  • 1199: Fix type inferencing for generic method assignment
  • 1200: Convert accessor call to property name fails for file not on build path
  • 1201: JDT error when closure expression used as annotation attribute value for Class<? extends SAMType>
  • 1202: Provide shading for extra lambda stack frame in debugger
  • 1205: Add support for Groovy 2.5.14
  • 1206: Add support for Groovy 3.0.7
  • 1209: CompileStatic: Spurious errors on equals method shown in eclipse editor and not in Problems
  • 1211: Add support for Groovy 4.0.0-alpha-2
  • 1212: Add import for selection fails for file not on build path

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

3.9.0

Greclipse 3.9.0 was released on September 30th 2020.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 3.0.6
  • Groovy 2.5.13
  • Groovy 2.4.20

The new Parrot Parser is disabled by default for Groovy 3. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4(). Please note that parser recovery is not implemented for the Parrot Parser, so your editing experience may be sub-par in this mode.

Support for new version of Eclipse

  • Eclipse 4.17 (2020-09)

Compiler Config

  • CompilerConfiguration#setTargetBytecode(String) now accepts "5", "6", "7", "8", "9" and "10" properly

  • Config Script: optimization option "indy" is no longer overridden by project sensing "indy" from core jar

Content Assist

  • Added parser recovery for incomplete path expression followed by variable declaration

    void test() {
      a.b.c.|
      def x = null
    }
  • Improved ordering and de-duplication of category method completion proposals

    Current:

    Previous:

  • Added proposals and fixed completion for trait super methods

Miscellaneous

  • Fixed Run As > Groovy Script for script outside of project's classpath

  • Improved suport for Jenkinsfile (and other Groovy Source types with no file extension)

  • Improved Call Hierarchy and Find References support for methods with default arguments

  • Added support for setting breakpoints in annotation closure

  • Improved suport for ASTTest transform

    Current:

    Previous:

Syntax Highlighting and Type Inferencing

  • field reference with accessor declared in super class (1130)
  • super-qualified reference to field (1131)
  • outer class member references (1132)
  • outer class of parent class references (1133)
  • methods with ternary expression arguments (1140)
  • private member references from nested closure (1141)
  • static import of inner class (1142)
  • overloaded extension methods (1143)
  • methods that use @DelegatesTo.Target (1147)
  • fields, methods and properties of Map-based types (1148)
  • final trait methods (1151)
  • static trait methods (1152)
  • members defined in multiple inherited traits (1158)
  • qualified trait super property (1159)
  • Object vs Object[] method overloads (1160)

Resolved Issues

  • 437: Not formatting files without *.groovy extension
  • 760: Code completion does not add necessary qualifier for method implemented by multiple traits
  • 794: Default arguments: wrong Call Hiearchy results found for method call in Java class
  • 1129: Autocomplete / proposals incorrect when followed by variable declaration
  • 1130: Fix type inferencing, syntax highlighting and code navigation for field reference with accessor declared in super class
  • 1131: Fix type inferencing, syntax highlighting and code navigation for super-qualified reference to field
  • 1132: Fix type inferencing, syntax highlighting and code navigation for outer class member references
  • 1133: Fix type inferencing, syntax highlighting and code navigation for outer class of parent class references
  • 1136: Config Script: explicit "indy" setting is overridden by project sensing "indy" from core jar
  • 1139: Add support for Eclipse 4.17 (2020-09)
  • 1140: Fix type inferencing, syntax highlighting and code navigation for methods with ternary expression arguments
  • 1141: Fix type inferencing and syntax highlighting for private member references from nested closure
  • 1142: Fix type inferencing, syntax highlighting and code navigation for static import of inner class
  • 1143: Fix type inferencing for overloaded extension methods
  • 1144: Add support for Groovy 2.4.20
  • 1145: Add support for Groovy 2.5.13
  • 1146: Add support for Groovy 3.0.5
  • 1147: Fix type inferencing, syntax highlighting and code navigation for methods that use @DelegatesTo.Target
  • 1148: Fix type inferencing, syntax highlighting and code navigation for fields, methods and properties of Map-based types
  • 1151: Fix support for final trait methods
  • 1152: Fix support for static trait methods
  • 1153: Improve ordering and de-duplication of category method completion proposals
  • 1154: Cannot set breakpoints within annotation closure body
  • 1155: ASTTest transform produces improper compiler error
  • 1158: Fix type inferencing, syntax highlighting and code navigation for members defined in multiple inherited traits
  • 1159: Fix syntax highlighting and code navigation for qualified trait super property
  • 1160: Fix type inferencing and code navigation for Object vs Object[] method overloads
  • 1163: Run As > Groovy Script fails when script is not part of project classpath
  • 1166: Add support for Groovy 3.0.6

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

3.8.0

Greclipse 3.8.0 was released on June 30th 2020.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 3.0.4
  • Groovy 2.5.12

The new Parrot Parser is disabled by default for Groovy 3. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4(). Please note that parser recovery is not implemented for the Parrot Parser, so your editing experience may be sub-par in this mode.

Support for new version of Eclipse

  • Eclipse 4.16 (2020-06)

Support for Java 14

As of Eclipse 4.16, Java 14 is supported within the IDE. It can be combined with Groovy 2.5 (or greater).

Content Assist

  • Code select disabled for method reference

  • Code navigation for overloaded constructors and methods has been improved, especially for generics and varargs

  • Support for asynchronous computation of content assist proposals has been enabled


    This warning is no more; the checkbox will work as intended

  • Option "Place trailing closure arguments after closing parenthesis" is not considered when typing { after comma or colon

Quick Assist and Quick Fix

  • Add import on selection fixed for nearly empty scripts

  • Change modifier to final quick assist should not be proposed for Groovy script

  • Quick Assist "Replace method call with property expression" now works on static method call

  • Save action "Remove unnecessary semicolons" no longer removes ; followed by (, { or [

Searching and Refactoring

  • Improve results for Find References and Call Hierarchy with constructor overloading

  • Spurious matches for accessor methods removed when finding declarations for property

  • Rename includes and can be started from implicit-this property reference within closure

Syntax Highlighting and Type Inferencing

  • extension methods that override Object methods

    Current:

    Previous:

  • primitive array does not match Object[] or T[] parameter

    Current:

    Previous:

  • dynamic field or property assigned in constructor or initialization method


  • dynamic variable set within if/else blocks or switch cases

    Current:

    Previous:

  • parameters of closure constructor arguments

    Current:

    Previous:

  • parameters of closure static method arguments

    Current:

    Previous:

  • method call with static method call argument

    Current:

    Previous:

  • enum constant private methods

    Current:

    Previous:

  • x.class == Type or x in Type (like x instanceof Type)

    Current:

    Previous:

  • && followed by instanceof

    Current:

    Previous:

  • SAM-type parameter to array return type (ex: Stream#toArray(IntFunction))

    Current:

    Previous:

  • class argument that does not match functional interface parameter

    Current:

    Previous:

  • trait property references

    Current:

    Previous:

  • type of unknown property

    Current:

    Previous:

  • dynamic variable used in method call expression

    Current:

    Previous:

  • script fields set within closure

    Current:

    Previous:

  • ternary expression with closure expressions

    Current:

    Previous:

DSLD

  • Added support for read-only property contributions
contribute(currentType(annos: annotatedBy(Singleton))) {
  AnnotationNode node = annos[0]
  String propertyName = node.getMember('property')?.text ?: 'instance'
  property name: propertyName, type: currentType, isStatic: true, readOnly: true
}
  • Script fields and variables can be used within contribution block
NAME = 'bar'
contribute(currentType('Foo')) {
  property name:NAME
}

Resolved Issues

  • 1061: Add support for Java 14
  • 1069: Change modifier to final quick assist should not be proposed for Groovy script
  • 1072: Add support for Groovy 2.5.11
  • 1073: Add support for Groovy 3.0.3
  • 1074: Indexing fails when config script adds static import of field or method
  • 1075: Add support for Eclipse 4.16 (2020-06)
  • 1076: Fix type inferencing, syntax highlighting and code navigation for extension methods that override Object methods
  • 1077: Primitive array should not match Object[] or T[] parameter
  • 1079: Quick Assist "Replace method call with property expression" does not work on static method call expr
  • 1080: Extend type inferencing of dynamic field or property assigned in constructor or initialization method
  • 1086: Fix type inferencing and syntax highlighting for dynamic variable set within if and else blocks
  • 1087: Error message when building a Groovy project or changing a Groovy source in it
  • 1089: Find declarations on Groovy property results in spurious matches for accessor methods
  • 1090: Wrong result in "Search for references" and "Call Hierarchy" with constructor overloading
  • 1091: Property reference in with { } closure not renamed
  • 1092: Cannot start refactoring from within with { } closure
  • 1093: Option "Place trailing closure arguments after closing parenthesis" should not apply to constructor calls
  • 1095: Fix type inferencing and syntax highlighting for parameters of closure constructor arguments
  • 1096: Fix type inferencing and syntax highlighting for parameters of closure static method arguments
  • 1099: StackOverflowError when placing a "static" keyword
  • 1100: Unrecognized method call with @CompileDynamic
  • 1101: Enhance type inferencing and syntax highlighting for x.class == Type (like x instanceof Type)
  • 1103: Wrong navigation for constructor call
  • 1105: Fix type inferencing for unknown property
  • 1109: Fix code select for method reference
  • 1110: Fix type inferencing for Stream#toArray(IntFunction)
  • 1111: Fix type inferencing for class argument that does not match functional interface parameter
  • 1113: Fix type inferencing, syntax highlighting and code navigation for trait property references
  • 1114: Add support for Groovy 2.5.12
  • 1115: Add support for Groovy 3.0.4
  • 1117: Fix syntax highlighting for dynamic variable used in method call expression
  • 1118: DSLD: fix support for script fields and variables
  • 1120: Fix type inferencing and syntax highlighting for ternary expression with closure expressions
  • 1121: Fix type inferencing and syntax highlighting for method call with static method call argument
  • 1122: Fix type inferencing and syntax highlighting for && followed by instanceof
  • 1123: Support asynchronous computation of content assist proposals
  • 1124: Remove semicolons save action fails to identify necessary semicolon before closure expression
  • 1126: DSLD: add support for read-only property contributions
  • 1127: Fix type inferencing, syntax highlighting and code navigation for script fields written within closure
  • 1128: Add import on selection does nothing for very sparse scripts

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

3.7.0

Greclipse 3.7.0 was released on March 31st 2020.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 3.0.2
  • Groovy 2.5.10
  • Groovy 2.4.19

The new Parrot Parser is disabled by default in Groovy 3. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4(). Please note that parser recovery is not implemented for the Parrot Parser, so your editing experience may be sub-par in this mode.

Support for new version of Eclipse

  • Eclipse 4.15 (2020-03)

Groovy Editor

  • Added parse error for invisible (control/format) characters

  • Fixed display of inaccessible type, unresolved indirect reference, and missing requires transitive errors

  • Fixed unit of record during batch compilation -- previously, the first source unit in a compilation unit would be listed as the origin of errors for @AutoFinal and similar.

    Current:

    Previous:

  • Fixed "this" expression checking which caused false STC error for direct call on closure member

    @groovy.transform.TypeChecked
    class C {
      Closure action
      void test() {
        action() // [Static type checking] - Cannot find matching method C#action().
      }
    }
  • Disabled legacy annotation collector search when requesting proposals for '@' to prevent content assist timeout

  • Fixed rename of getter/setter but not property or setter/getter for compound assignment (+=, ++, etc.)

  • Fixed search accuracy for references to static methods w/o overloads in static imports

  • Fixed retention of imports after Organize Imports clean-up for bean-style use of static import method

    import static p.Q.getBadName as getGoodName
    import static p.Q.getFineName
    def one = goodName
    def two = fineName

    Also works for isser and setter variations.

  • Fixed resolution of Groovy Property during annotation-based null analysis to prevent false errors in the Java Editor

  • Fixed handling of groovy source file in non-Groovy project to allow syntax coloring and prevent error logging

  • Fixed concurrency issues with DSLD Refresh job to prevent error logging and unresponsive editor

Groovy Launches

  • Added support for Coverage As > Groovy Script

  • Fixed source lookup for Debug As > Groovy Script

    Current:

    Previous:

  • Fixed dependency bootstrapping for Run As > Groovy Console/Shell

    Run As > Groovy Console and Run As > Groovy Shell can now be used without the need to provide any extra jars.

Quick Assist and Quick Fix

  • Quick Fixes for adding unimplemented methods to a type, adding Groovy Libraries to a project, and switching a Java source to Groovy have been restored

  • Quick Assist "Assign statement to new local variable" no longer proposed for package and import statements

  • Quick Fix "Add Groovy Libraries to classpath" includes module=true attribute if project is modular

  • Quick Fix "Add 'requires module.name' to module-info.java" proposed for inaccessible type markers

Syntax Highlighting and Type Inferencing

  • closure argument to overloaded method with SAM type

    Current:

    Previous:

  • method pointer or reference to "new" (Groovy 3)

  • boolean category methods

    Current:

    Previous:

  • switch with class cases

    Current:

    Previous:

  • STC: !instanceof flow type

    Current:

    Previous:

  • fully-qualified types in catch parameters and instanceof expressions

    Current:

    Previous:

  • method call with named arguments of overloaded method

    Current:

    Previous:

  • read/write property access (i.e. +=, ++, etc.)

    Current:

    Previous:

  • bean-style use of setter with non-void return type

    Current:

    Previous:

  • single-character bean-style reference to static import method

    Current:

    Previous:

Resolved Issues

  • 890: Run As Groovy Console/Shell does not bootstrap its dependencies
  • 994: Content assist times out
  • 1001: Parse error with shift operator in static field
  • 1007: Add support for Eclipse 4.15
  • 1008: Add support for Groovy 3.0rc3
  • 1009: Add support for Groovy 2.5.9
  • 1010: Add support for Groovy 2.4.18
  • 1014: Rename of getter/setter but not property or setter/getter can cause error for +=, ++, etc.
  • 1015: Fix type inferencing and syntax highlighting for read/write property access (i.e. +=, ++, etc.)
  • 1016: ConcurrentModificationException when refreshing DSLD scripts
  • 1017: STC: direct call on closure member indicated as error
  • 1018: Compiler errors recorded against incorrect source unit (first in compilation unit)
  • 1019: Search for static method w/o overloads should be exact match in static import
  • 1020: Fix code hover for bean-style reference to static import method
  • 1022: NPE in CompilerConfiguration
  • 1024: Fix type inferencing for method call with named arguments of overloaded method
  • 1025: Fix type inferencing and syntax highlighting for bean-style use of setter with non-void return type
  • 1027: Fix type inferencing and syntax highlighting for boolean category methods
  • 1028: Invalid Groovy compiler level: null when running eclipse plugin
  • 1029: Add support for Groovy 3.0.0
  • 1030: Add support for Groovy 3.0.1
  • 1033: Fix source lookup for Run As > Groovy Script
  • 1034: Add support for Coverage As > Groovy Script
  • 1039: Enabling annotation based null analysis on the project brings a wrong compiler error in editor for a Java class
  • 1041: Java Model Exception in error log
  • 1042: Fix syntax highlighting for fully-qualified types in catch parameters and instanceof expressions
  • 1047: Fix type inferencing for closure argument to overloaded method with SAM type
  • 1048: Fix type inferencing and syntax highlighting for method reference/pointer to "new"
  • 1051: Add support for Groovy 2.4.19
  • 1055: Add support for Groovy 2.5.10
  • 1056: Fix type inferencing and syntax highlighting for switch with class cases
  • 1057: Add support for Groovy 3.0.2
  • 1058: Quick Fix proposals missing for unimplemented abstract methods and other errors
  • 1059: Add quick fix(es) for modular project classpath/modulepath problems
  • 1060: Invisible unicode characters in source file do not raise any errors
  • 1064: Build Path > Add Libraries... > Groovy Runtime Libraries fails with duplicate entry error
  • 1065: Fix organize imports for static import alias used in bean-style reference
  • 1066: (apparent) Deadlock caused by RefreshDSLDJob
  • 1068: Assign statement to variable quick assist should not be proposed for package and import statements

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

3.6.0

Greclipse 3.6.0 was released on December 31st 2019.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 3.0rc2

The new Parrot Parser is disabled by default in Groovy 3. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4(configuration). Please note that parser recovery is not implemented for the Parrot Parser, so your editing experience may be sub-par in this mode.

Support for new version of Eclipse

  • Eclipse 4.14 (2019-12)

Note: Support for Eclipse 4.8 (Photon) has been dropped.

Support for Java 13

As of Eclipse 4.14, Java 13 is supported within the IDE. It can be combined with Groovy 2.5 (or greater).

Content Assist

  • additional extension methods (DGMs)

  • annotation attribute class literal and property expressions

Before After
  • invalid implicit-this private method call
Before After

Call Hierarchy and Find References

  • pseudo-property references to accessor method
Before After

Type Inferencing and Syntax Highlighting

  • meta-annotation attributes

  • @DelegatesTo(type="") that references static inner class

  • interface default methods

  • method overloads with unqualified inner types

Before After
  • instanceof followed by &&

  • !instanceof

  • multi-assign of number wrapper type

  • abstract reference to static method

Before After
  • DSLD constructor contributions
Before After
  • super field direct access
Before After
  • spread, spread map and multi-assignment expressions
Before After
  • lambdas with variable expression for parameter list

  • compiler-supplied enum methods

Resolved Issues

  • 959: Fix type inferencing and syntax highlighting for meta-annotation attributes
  • 963: Add support for Java 13
  • 964: Add support for Eclipse 4.14
  • 966: Fix type inferencing for @DelegatesTo(type="") that references static inner class
  • 967: Fix type inferencing and syntax highlighting for interface default methods
  • 970: NullPointerException in RefreshDSLDJob
  • 971: Fix error range for annotation attribute class literal and property expressions
  • 972: Mark groovy-eclipse-compiler mojos threadsafe
  • 974: Inner class of super class is not resolving without qualifier
  • 975: Fix type inferencing and syntax highlighting for method overloads with unqualified inner types
  • 976: Syntax highlight is broken after accessing field in grails config
  • 977: Fix type inferencing and syntax highlighting for instanceof followed by &&
  • 978: Improve flow typing support for !instanceof
  • 979: Add support for Groovy 3.0rc1
  • 981: Unable to switch groovy compiler version. Error in the UI (red elements)
  • 985: Stack overflow for set super.property within getter override under @CompileStatic
  • 986: SC: Mark Occurrences misses property-style access to accessor method
  • 987: testCompile using groovy-eclipse-compiler fails with error about --patch-modules
  • 988: Call Hierarchy and Find References missing pseudo-property references to accessor method
  • 990: Fix type inferencing and syntax highlighting for multi-assign of number wrapper type
  • 991: NPE on autocompletion
  • 993: Fix type inferencing and syntax highlighting for abstract reference to static method
  • 995: Fix type inferencing and syntax coloring for DSLD constructor contributions
  • 996: Fix type inferencing and syntax coloring for super field direct access
  • 997: Fix type inferencing and syntax highlighting for spread, spread map and multi-assignment expressions
  • 998: Add support for Groovy 3.0rc2
  • 999: Fix error reporting for invalid private method call
  • 1000: Fix type inferencing and syntax highlighting for lambdas with variable expression for parameter list
  • 1002: Fix type inferencing, syntax highlighting and code completion for more DGMs
  • 1004: Fix type inferencing and syntax highlighting for compiler-supplied enum methods
  • 1013: Rename of setter causes invalid rename to bean-style access

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

3.5.0

Greclipse 3.5.0 was released on September 29th 2019.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 2.5.8
  • Groovy 3.0b3

The new Parrot Parser is disabled by default in Groovy 3. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4(configuration). Please note that parser recovery is not implemented for the Parrot Parser, so your editing experience may be sub-par in this mode.

Support for new version of Eclipse

  • Eclipse 4.13 (2019-09)

Note: Support for Eclipse 4.7 (Oxygen) has been dropped.

Groovy Libraries classpath container

Issues with javadoc and sources attchment have been fixed for jars within the Groovy Libraries classpath container. Javadoc links for the built-in Groovy and Ivy libraries have been fixed so included javadoc is used. Sources and/or Javadoc jars will be properly attached to main jars for ${user.home}/.groovy/lib items:

Before After

Groovy Editor

Code Minings

Added in Eclipse 4.8 (Photon), Editor Code Minings (aka Inline Annotations) is the answer to VS Code's CodeLens. This feature has been moved from prototype status to fully available and configurable. Support for displaying references, implementations and parameter names is available. Additional Code Minings can be added using the standard Eclipse API.

Global AST Transforms

Sources opened in the Groovy Editor will now have global transforms applied (except Spock). Previously, only Grab and AstBuilder were executed by default and a system property could be set to include others. Now, like local transforms, global transforms are applied to give the most accurate representation of the AST.

The Spock transform is still excluded until some issues with the value recorder AST re-writes in the expect block can be addressed.

Outline View

Removing a field (or other element) using the Outline View no longer causes issues in the Groovy Editor when using Windows line endings (\r\n).

Content Assist and Quick Fixes

  • Code hover for fields and methods with wildcard generics
Before After
image
  • Code hover for Groovy property with generics referenced from Java source

  • Code hover for java.lang.Object anonymous inner classes

  • Content assist for static method as object expression

  • Content assist for type arguments and parameters (aka generics)
Before After
  • Organize Imports removes inner class imports for qualified references
// will be removed by Ctrl+Shift+O
import java.util.Map.Entry

void meth(Map.Entry entry) {
  ...
}
  • Convert to method creates valid syntax for no-param closure with arrow

Call Hierarchy and Find Occurrences

Call Hierarchy (Ctrl+Alt+H), Find References (Ctrl+Shift+G), etc. for Groovy properties produce more accurate matches for bean-style (idiomatic), direct-field and accessor-method uses under static compilation. Previously some of these kinds of references were marked as potential matches, which can be confusing and hampers refactorings like rename.

class Pogo {
  Number number
}
class Groovy {
  @groovy.transform.CompileStatic
  void meth(Pogo pogo) {
    pogo.number
    pogo.@number
    pogo.number = 0
    pogo.getNumber()
    pogo.setNumber(42)
  }
}
public class Java {
  public void meth(Pogo pogo) {
    Number n = pogo.getNumber();
    pogo.setNumber(42);
  }
}

Java Interoperability / Joint Compilation

Compatibility has been improved for annotation attribute default and static final field initial values.

  • handle default initializers (primitive with no value expression)
  • handle character literals/casts
  • handle negative number literals
interface Groovy {
  int ZERO
  char SPACE = ' '
  long LOWER_BOUND = -1
}

Type Inferencing and Syntax Highlighting

  • Fully-qualified constructor call expression
  • Fully-qualified static method call expression
  • Anonymous inner class within a closure expression
  • Anonymous inner class in default argument expression
  • Anonymous inner class assigned to dynamic-typed local variable

  • Anonymous inner with object initializer and further nested anonymous types
  • Source reference to meta-annotation (@AnnotationCollector)
  • Import alias of inner class used in method overloads
  • Static import alias under static compilation (#962)

Traits

  • Fix type inferencing of public trait method called from implementing class
Before After
  • Fix type inferencing and syntax highlighting for super call in trait
Before After
  • Fix type inferencing and syntax highlighting for trait property references
Before After
  • Fix type inferencing and syntax highlighting for super trait method and property references

Before

After

Resolved Issues

  • 642: Can new Code Mining or Inline Annotations editor features be leveraged or exposed to DSLD
  • 814: Remove system-property-based filtering of global AST transforms
  • 901: Scripts that match project filters generate problem markers for compiler errors in Problems view
  • 913: Leverage some Java code minings in the Groovy editor
  • 918: Add support for Eclipse 4.13
  • 919: Enable code minings for references, implementations and method parameters
  • 920: Fix code hover for fields and methods with wildcard generics
  • 921: Improve code hover for Groovy property with generics referenced from Java source
  • 923: Organize Imports fails to remove inner class import for qualified reference
  • 924: Fix support for anonymous inner class in default argument expression
  • 925: Add support for Groovy 3.0b2
  • 926: Fix support for anon. inner with object initializer and further nested anon. types
  • 927: Fix type inferencing and syntax highlighting for anon. inner in with block
  • 929: Fix syntax coloring for fully-qualified constructor call expression
  • 930: Fix syntax coloring for fully-qualified static method call expression
  • 931: NPE happens in Java Builder with enabled annotation-based analysis and groovy
  • 933: Add support for Groovy 2.5.8
  • 934: Add support for Groovy 3.0b3
  • 935: Search for references: potential matches?
  • 937: SC: search for references of Groovy property as part of path expression finds 1 exact and 1 potential match for same location
  • 939: Code select and find references on implicit-this field or property in closure fails
  • 940: Exception in phase 'semantic analysis' in source unit 'builder_transform.dsld' zip file closed during DSLD scripts refresh
  • 942: Sources and/or Javadoc jars not attached to main jars for ${user.home}/.groovy/lib items
  • 943: Outline View not updated after field removal from the Outline View itself
  • 944: Editor contents disappear after removing field from the Outline View
  • 945: Convert to method creates invalid syntax for no-param closure with arrow
  • 946: Missing code assist in static method calling another static method
  • 949: Improve completion proposals for type arguments and parameters (aka generics)
  • 950: Source reference to meta-annotation causes errors in editor
  • 951: Import alias of inner class and method overloads can cause type inferencing breakdown
  • 953: Fix type inferencing and syntax highlighting for super trait method and property references
  • 954: Fix type inferencing for anon. inner class assigned to dynamic-typed local variable
  • 956: Fix type inferencing of public trait method called from implementing class
  • 957: Meta-annotation attributes cause errors in compiler/editor
  • 960: Fix type inferencing and syntax highlighting for trait property references
  • 961: Fix type inferencing and syntax highlighting for super call in trait
  • 962: Fix syntax highlighting for static import alias under static compilation

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

3.4.0

Greclipse 3.4.0 was released on June 29th 2019.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 2.4.17
  • Groovy 2.5.7
  • Groovy 3.0b1

The new Parrot Parser is disabled by default in Groovy 3. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4(configuration). Please note that parser recovery is not implemented for the Parrot Parser, so your editing experience may be sub-par in this mode.

Pre-release Groovy compiler fixes

Support for new version of Eclipse

  • Eclipse 4.12 (2019-06)

Support for Java 12

As of Eclipse 4.12, Java 12 is fully supported within the IDE. It can be combined with any supported version of Groovy. Modulepath entries are not yet supported for Groovy sources; classpath entries work as expected.

Groovy Libraries preferences dialog

Add library wizard page

Groovy Libraries prefs page

Before:

Groovy Libraries prefs page (before)

Run As > Groovy Script - config script handling

Two paths exist when running a Groovy Script from a project that supplies a compiler configuration script:

  1. If script is part of project's classpath (in source folder and does not match a script filter), config script is applied
  2. If script is not part of project's classpath (not in source folder or matches a script filter), config script is not applied

This matches the general handling of Groovy scripts with respect to compiler configuration within the project. So, for example, if you added an import in your config script and your script is expecting this import to resolve a referenced type, the config script is applied at runtime and the script should execute properly.

Content Assist and Quick Fixes

Completing the type on a new field or property declaration has been improved.

class Pogo {
  String foo
  Tree|
}

Applying one of the type completion proposals at | now respects the user's import/qualifer preferences.

If "Tree" is preceded by a modifier and a "Tree" type proposal is applied, there is still an open issue: https://github.com/groovy/groovy-eclipse/issues/873

Call Hierarchy and Find Occurrences

Implicit-this (no object expression) field references in sources with @CompileStatic are now resolved correctly.

@CompileStatic
class Pogo {
  boolean flag
  Pogo(Pogo that) {
    flag = that.flag // 2 occurrences
  }
  void setFlag(boolean value) {
    if (condition()) {
      flag = false // 1 occurrence
    } else {
      flag = value // 1 occurrence
    }
  }
  private boolean condition() { ... }
}

When searching for references of the field flag, only that.flag was producing a match within the class.

Type Inferencing and Syntax Highlighting

  • Repeated annotations
  • Constructor declarations
  • Deprecated this/super constructor calls
  • Overloaded methods and property expression argument(s)
  • Static final property accessed from outside of declaring class
  • Static reference to instance method in Groovy 3 (Parrot Parser enabled)

Syntax Highlighting of type references

As seen in the Java editor, the Groovy editor has been enhanced to provide separate preferences for highlighting:

  • Classes
  • Abstract classes
  • Interfaces
  • Annotations
  • Enumerations
  • Traits
  • Type parameters

Semantic highlighting of Types (after)

Semantic highlighting of Types (before)

Color/style fallbacks for disabled preferences

If a syntax highlighting group on the left is disabled, it will fall back to the designated group on the right. These match the Java editor's behavior and should increase flexibility when setting up color/style profiles.

  • Abstract class -> class
  • Method declaration -> method
  • Static method invocation -> method
  • Static final field -> static field -> field
  • Parameter declaration -> local variable declaration

In addition, any disabled color/style group that does not have an enabled fall back will properly fall back on Other (the default non-brace, non-operator color/style).

NOTE: Unlike the Java editor, the color choice for Deprecated is ignored by the Groovy editor. Only the style (strikethrough by default) is applied.

Reference to Groovy property from Java source

In the Java editor, code hover (F2) and code select (F3 or Ctrl+click) over getString used to refer to class Pogo and not property string, which made quick determination of expression type a pain.

Now the reference is resolved as it is within the Groovy editor and navigation works as expected:

Error ranges for annotations

An off-by-one error was fixed for source elements on the first line of a source unit. And the leading @ is now included in the source range of annotations, which matches the Java editor.

Before (does not include @):

Resolved Issues

  • 727: Add semantic highlighting (aka syntax coloring) of Types
  • 757: Run As Groovy Script: fix config script handling
  • 838: Add support for Java 12
  • 839: Add support for Eclipse 4.12
  • 863: Compiler error on code that compiles with groovyc
  • 864: Transfer more Java project settings to Groovy compiler configuratuion
  • 865: CompilationUnit always outputs class files (and I never want class files)
  • 866: Fully-qualified type name inserted in field declaration instead of import + simple name (disregarding workspace preference)
  • 867: Include the fix for Eclipse 4.11 bug 545293
  • 871: NPE for super in anon. inner method within static method
  • 872: Static Type Checking on Map Iteration Shows Incorrect Compile Errors
  • 875: Fix syntax highlighting of static final property accessed from outside of declaring class
  • 876: Fix mapping of @PackageScope for source references
  • 877: Refresh the Groovy Libraries classpath container prefs page
  • 878: Fix type inferencing of static reference to instance method in Groovy 3
  • 881: Error range indicators are off on line 1 and do not include '@' for annotations
  • 883: Add support for Groovy 2.4.17
  • 884: Add support for Groovy 2.5.7
  • 885: Add support for Groovy 3.0b1
  • 886: Annotation with missing attribute value shows no error when used on local variable
  • 887: Support boolean value annotations
  • 888: Improve code hover and select for Groovy property referenced from Java source
  • 891: Search for references of field within @CompileStatic class misses occurrences
  • 892: Fix type inferencing of overloaded methods and property expression argument(s)
  • 895: Missing curly brace causes OOM in parser
  • 905: Fix semantic highlighting of constructor declarations
  • 907: Fix semantic highlighting of deprecated this or super constructor calls
  • 908: Import alias and method overloads can cause type inferencing breakdown
  • 914: Streamline compiler config script processing
  • 915: Fix semantic highlighting of repeated annotations
  • 916: Fix syntax coloring fallbacks for disabled preferences
  • 917: Improve type inferencing for Spock expect block

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

3.3.0

Greclipse 3.3.0 was released on March 29th 2019.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 2.5.6
  • Groovy 3.0a4 new

Groovy 3 examples

The new Parrot Parser is disabled by default in Groovy 3. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4(configuration). Please note that parser recovery is not implemented for the Parrot Parser, so your editing experience may be sub-par in this mode.

Support for new version of Eclipse

  • Eclipse 4.11 (2019-03)

empty workspace

Security of build process and external references

References in metadata and maven builds have been changed to https where possible.

Preference dialogs

Groovy prefs panel

Editor prefs panel

Project Compiler prefs panel

Worksapce Compiler prefs panel

Content Assist and Quick Fixes

  • closures within closures
  • filtering for new accessor methods
  • quick fixes for correcting modifier issues
  • @groovy.transform.NamedParam on constructors

Call Hierarchy and Find Occurrences

  • constructor and methods with default parameter(s)
  • anonymous inner class constructor calls
  • @groovy.lang.Newify constructor calls

Type Inferencing and Syntax Highlighting

  • Closure-specific methods and properties
  • extension methods used in type that implements Iterable, etc.
  • Spock test method with data table
  • private field of super type
  • bounded generics as method return type
  • category method pointer
  • overloaded property setter
  • missing properties that look like method references

Resolved Issues

  • 413: Add support for Groovy 3.0
  • 611: Add quick fixes for fixing modifiers when attempting to reduce visibility of override method
  • 612: Add quick fix for attempt to override final method
  • 637: Add @NamedParam support for constructors
  • 721: Want a way to disable "combining closures with only one statement into one line"
  • 723: Improper constructor name on Groovy class after copy-and-paste
  • 742: Add support for Eclipse 4.11
  • 773: Default parameters: wrong Call Hiearchy results found for method call
  • 775: Default parameters: constructor call not found by Call Hierarchy
  • 776: Default parameters: wrong signature considered when invoking Call Hierarchy from a method/constructor call omitting optional parameters
  • 784: Missing reference to setter when in with { }
  • 786: DSLD: missing content assist proposals for isThisType pointcut
  • 787: Outer references proposed before self references in Code Assist within 'with' closure
  • 788: No references found for members of Groovy class referenced within 'with' closure
  • 789: No code assist for 'super(' and 'this('
  • 790: Constructor with defaulted parameter is interfering with breakpoint location
  • 792: the 'org.codehaus.groovy.eclipse.codeassist.completion' plug-in and throw a runtime exception when type "0."
  • 796: Call Hierarchy and Find References support for @Newify constructor call expressions
  • 797: Call Hierarchy and Find References support for @Newify(Type) constructor call expressions
  • 798: Call Hierarchy and Find References support for anonymous inner constructor call expressions
  • 801: Type inferencing of overloaded property setter
  • 802: Type inferencing of missing properties that look like method references
  • 803: Missing field completion in nested with closure
  • 804: Type inferencing of category method pointer
  • 805: Add support for Groovy 2.5.6
  • 808: ArrayIndexOutOfBoundsException using content assist
  • 809: Fix type inferencing for Closure-specific methods and properties
  • 810: Fix type inferencing for extension methods used in type that implements Iterable, etc.
  • 812: Fix type inferencing for Spock test method with data table
  • 815: Fix type inferencing for private field of super type
  • 825: Fix type inferencing for bounded generics as method return type
  • 826: ArrayIndexOutOfBoundsException - Type Inference
  • 827: Fix code select for method call with named and positional arguments
  • 836: Fix type inferencing for indirect static method under CompileStatic
  • 837: Content assist missing proposals for indirect static members
  • 840: Fix organize imports for indirect static-star imports
  • 850: Infinite compile time and tons of errors
  • 851: System ClassLoader getting closed by the GroovyParser.clearCache()
  • 862: Improve code assist in field declaration

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

3.2.0

Greclipse 3.2.0 was released on December 29th 2018.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 2.5.5
  • Groovy 2.4.16

Support for new version of Eclipse

  • Eclipse 4.10 (2018-12)

Support for Java 11

As of Eclipse 4.10, Java 11 is fully supported within the IDE. It can be combined with any supported version of Groovy. Modulepath entries are not yet supported for Groovy sources; classpath entries work as expected. Lambdas, method references and var keyword support is available in Groovy 2.6+.

New Type Wizard

JDT has separate wizards for creating classes, interfaces, etc. If GDT followed this pattern, there would be quite a few items in the New context menu. Instead, the New Groovy Class wizard has been enhanced to support selection of other Groovy archetypes. This reduces clutter and makes room for additional Groovy-specific controls.

Groovy Type wizard

Groovy Class wizard

Groovy Trait wizard

Groovy Script wizard

Groovy Interface wizard

Groovy Annotation wizard

Groovy Enumeration wizard

Improvements to Content Assist

Support for "Completion overwrites" has been fixed and "Hide deprecated references" has been added for fields, methods, properties, etc.

Java Content Assist prefs

Annotation attributes

Support for completion of multiple annotation attributes has been fixed.

Content Assist for annotation

Content Assist for annotation

Content Assist for annotation

Closure delegate and owner members

When engaging content assist (Ctrl+Space) within a closure, delegate and owner property completions are proposed. In case of a conflicting name, a qualifier may be added depending on the closure's resolve strategy. In this case, DefaultGroovyMethods.with is defined with a strategy of DELEGATE_FIRST, so delegate properties can be used unqualified, but owner properties may require a qualifier.

public static <T,U> T with(
    @DelegatesTo.Target("self") U self,
    @DelegatesTo(target="self", strategy=Closure.DELEGATE_FIRST)
    @ClosureParams(FirstParam.class) Closure<T> closure)

Content Assist for closure

Content Assist for closure

Special constructor calls

Support for completion of this and super constructor call expressions has been added. Find occurrences and open declaration should work as expected for complete expressions.

Content Assist in constructor

Content Assist in constructor

Content Assist in constructor

Content Assist in constructor

Incomplete switch statements

Parser error recovery has been added to support completion proposals on incomplete case labels.

Content Assist in case label

Content Assist in case label

Content Assist in case label

Named arguments for supertype properties

Content Assist for map constructor

Improvements to Call Hierarchy and Find Occurrences

Call Hierarchy (Ctrl+Alt+H), Find Declarations (Ctrl+G) and Find References (Ctrl+Shift+G) have been improved for multiple constructors, including constructor variants generated by default parameter values.

Improvements to Type Inferencing, Syntax Coloring, etc.

  • spread-dot operator
  • trait fields and methods
  • methods w/ parameter defaults
  • compiler configuration scripts

Quick assist "Inline local variable"

A new quick assist (Ctrl+1) was created for replacing each occurrence of a local variable name with its initialization expression. Parenthesis are added for low-precedence expressions like unary minus, bitwise negation, pre- and post-increment, and so on.

before Inline Local Variable after Inline Local Variable

Resolved Issues

  • 364: Code assist does not add necessary "owner" qualifier when accepting owner property suggestions within 'with' closure
  • 439: When code completion includes an import, conflicting names are not considered
  • 471: Ctrl triggering of constructor proposal inserts arguments and parentheses
  • 516: Add quick assist "Inline local variable" like Java editor provides
  • 671: Add support for "Hide deprecated references" content assist preference for fields, methods and properties
  • 686: Add support for Java 11
  • 706: Warning about "missing @Override" only shown for anonymous inner classes
  • 741: Add support for Eclipse 4.10
  • 749: DSLD: Add support for method parameter type annotations like @ClosureParams and @DelegatesTo
  • 750: Fix type inferencing for this and super trait method calls
  • 751: Fix type inferencing for static trait fields
  • 752: Do not propose synthetic variables $self and $static$self within trait methods
  • 753: Propose private trait fields and methods within trait and implementers
  • 754: Add support for folding of private trait methods
  • 755: Fix code hover and code select for static method call in trait
  • 756: Fix open declaration for trait field and static method references in trait implementer
  • 758: Quick fix for adding @Override annotation inserts at wrong position if method has annotation(s)
  • 761: Code assist not working in annotation when one attribute is already specified
  • 762: No code assist on enum value while typing a switch statement
  • 763: Fix type inferencing for spread on list of lists
  • 765: Constructor call of nested class not found by neither call hierarchy nor find references
  • 766: Code assist for map constructors does not propose fields of super class(es)
  • 768: Overloading not properly handled for constructor calls
  • 769: Irrelevant suggestions given when invoking code assist for annotation attributes
  • 770: No code assist at all for this(...) and super(...)
  • 771: Groovy compiler error: exception in phase 'class generation' in source unit
  • 772: Code assist proposes completions for delegate or owner regardless of strategy set by DelegatesTo
  • 774: Default parameters: wrong navigation on constructor call
  • 777: Add support for Groovy 2.4.16
  • 779: @GrabConfig(systemClassLoader=true) Causing exception: No suitable ClassLoader found for grab
  • 781: Add support for Groovy 2.5.5
  • 782: Add support for trait, script, etc. in New Type Wizard

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

3.1.0

Greclipse 3.1.0 was released on October 22nd 2018.

New and Noteworthy

Support for new version of Groovy

  • Groovy 2.5.3

Support for new version of Eclipse

  • Eclipse 4.9 (2018-09)

Support for Java 11

Eclipse 4.9 does have a patch available that adds Java 11 support. However, since it patches some of the same bundles that Greclipse does, both cannot be applied together. Therefore, Groovy and Java 11 support together will have to wait until Eclipse 4.10 (2018-12) is available.

Problem marker decorations in Project Explorer

Problem marker label decorations were missing for compilation unit nodes (Groovy sources) in the Project Explorer. This has been fixed.

Project Explorer markers

Support for Eclipse Dark Theme

Syntax colors were updated or inherited from Java to make the Dark Theme in the Groovy Editor look and feel like the Java Editor does. Also, the Groovy Event Console colors were updated to show better contrast in Dark Theme mode.

editor colors

editor color prefs

Keyword color prefs were reorganized so def, var and void are highlighted the same as primive type keywords. A separate preference was added for assert, as this might be a keyword you want to highlight differently from the others. Clicking the "Copy Java Color Preferences" properly copies the bold preferences, which are typically off for Dark Theme and on for Light Theme.

Improvements to Type Inferencing, Syntax Coloring, and Refactoring

  • star imports (code hover/select of type and package)
  • @Transactional, et al. methods
  • @Deprecated types and members
  • static/object initializers
  • static accessor methods
  • anonymous inner classes
  • GString sub-expressions GString coloring
  • Java 10 var keyword Java 10 var keyword

Improvements to Call Hierarchy and Type Hierarchy

Type Hierarchy (Ctrl+T or F4) now supports anonymous inner types.

Call Hierarchy (Ctrl+Alt+H) now supports property-style use of methods and method pointers.

Improvements to Content Assist

  • range expressions
  • substring match ordering
  • image for keyword proposals
  • unimplemented abstract methods

Annotation method default values in Javadoc hovers

" : boolean.class" was added to annotation attribute hover below to match Java Editor's support. Annotation attribute default value in hover

Generics in Content Assist proposals

Current: Content Assist proposals with generics Previous: Content Assist proposals without generics

Improvements to AST Viewer

  • initial population
  • boolean properties
  • reduced ASTNode and ClassNode redundancies

Resolved Issues

  • 384: Some expression parts not highlighted in GString expressions
  • 389: Error when renaming overridden method in enum constant
  • 394: Argument names missing in code assist proposals for implementing missing methods
  • 395: Missing code assist proposals to implement missing methods in anonymous inner class
  • 411: Inconsistent list of suggestions when trying to complete List.with
  • 417: Add support for annotation method default values in Javadoc hovers
  • 477: Inconsistent code assist behaviour depending on how it is invoked (partially qualified inner classes)
  • 491: Missing prefix suggestion for map-style constructor invocation when inserting a parameter in the middle
  • 500: Wrong insertion of guessed argument when "Completion overwrites" is chosen
  • 501: Missing suggestions for static methods in code assist when parser recovery involved
  • 508: Implicit getter and setter accesses not shown in Call Hierarchy
  • 509: Method pointers not shown in Call Hiearchy
  • 630: Add import highlighting of deprecated types and members when type used as qualifier
  • 640: Add support for code hover/select of type in star import
  • 654: Add quick fix for unimplemented abstract methods in anonymous inner class
  • 660: Fix type inferencing for closure parameter default values
  • 661: Fix content assist for raw Class references
  • 662: Content assist in free-variable position includes a number of low value proposals
  • 663: Completion proposals for property showing visibility of backing field
  • 664: Quick assist produces error in scopes with no containing method
  • 666: Improve support for Dark Theme
  • 667: Add support for Java 10 var keyword
  • 670: Missing DSLD code assist proposals at start of non-empty closure block for delegate type
  • 672: NullPointerException while refactoring a field name in a Java class
  • 673: Error reported on subclass of a class implementing trait
  • 675: Code assist fails when missing optional dependency in your project
  • 676: Cannot easily type a range when "Enable auto activation" for code assist is enabled
  • 677: Fix type inferencing and syntax coloring of method calls in class implementing trait
  • 678: Rename of accessor method improperly renames property-style accesses
  • 679: Fix type inferencing and syntax coloring of static property access within class of property
  • 683: Fix type inferencing and syntax coloring of static property access outside class of property
  • 684: Add parser recovery for incomplete range expression
  • 685: Add support for Eclipse 4.9
  • 687: Fix content assist for number expression
  • 689: Fix content assist for void return type from methods
  • 690: Inconsistent code assist suggestions for range expression
  • 691: Fix content assist proposal image for keyword proposals
  • 695: Anonymous inner class: wrong "override method" result when a space is present
  • 696: IllegalArgumentException on code assist invocation
  • 700: Add content assist proposals to implement missing methods in anonymous inner classes (pt.2)
  • 701: NullPointerException in some code completion
  • 705: "Override method in" implemented trait not proposed
  • 706: Warning about missing @Override only shown for anonymous inner classes
  • 708: No error mark on Groovy code that does not compile
  • 709: Organize imports adds config script alias import
  • 710: Add support for generics in content assist proposals
  • 711: "Override method" code assist: wrong result when generics are involved but unspecified
  • 712: Grails method-decorating transforms impact type inferencing and syntax highlighting
  • 714: Error compiling class that implements trait (binary reference from grails-testing-support)
  • 716: Fix syntax highlighting of property-style access of method (no backing field)
  • 717: Missing field, method, property proposals within constructor call expression
  • 718: Inner static block is causing compilation error
  • 720: Open declaration on default param(s) method variant goes to top of source
  • 724: Import all does not work for long packages
  • 725: Problem marker decorations missing in Project Explorer
  • 729: Groovy AST Viewer does not populate with current editor's AST when initially opened
  • 731: Organize imports drops static alias when static star is also present
  • 732: Organize imports drops same-named static imports from separate types/packages
  • 733: Trait applied to interface with generic cause compile error
  • 736: Cannot run all spock tests in a directory
  • 737: With eclispe groovy plugin 3.x we can't compile our project anymore
  • 738: Convert to property action generates incorrect property names for getABCXyz() style methods
  • 744: Error visiting method with type annotation
  • 745: DSLD does not support array class literals for param and return types
  • 746: DSLD improve support for generics in method param and return types

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

3.0.0

Greclipse 3.0.0 was released on August 2nd 2018.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 2.6a4 new
  • Groovy 2.5.1
  • Groovy 2.4.15

Java 8 is the new minimum supported runtime. Support for Groovy 1.8 through 2.3 has been dropped.

The new Parrot Parser is part of Groovy 2.6+; it can be enabled in 2.6 by setting the groovy.antlr4 system property to true. Error recovery is not yet implemented in the new parser, so edited sources may generate more errors than usual and features like content assist may fail on incomplete expressions.

Support for Ant, Groovy Shell and Groovy Console

Groovy 2.5+ has replaced the monolithic groovy-all jar with a modular approach. This has forced the hand of GDT a bit; built-in support for Ant, Groovy Shell and Groovy Console have taken a bit of a step back. Support remains unchanged if the Groovy 2.4 compiler is used. Otherwise, the required libraries must be supplied on the project classpath. This can be accomplished using Ivy/Maven/Gradle, ~/.groovy/lib or by other means.

Support for new versions of Eclipse

  • Eclipse Photon (4.8.0)
  • Eclipse Oxygen (4.7.3a)

Support for Eclipse 3.7 through 4.6 has been dropped.

Support for Java 10

As of Eclipse Oxygen SR3a and Photon, Java 10 is fully supported within the IDE. It can be combined with any supported version of Groovy. Modulepath entries are not yet supported for Groovy sources; classpath entries work as expected. var keyword support is coming in Groovy 3.

Support for test sources classpath attributes in Photon

Within the Groovy Libraries classpath container, the groovy-test jar from Groovy 2.5+ is marked as "Visible only for test sources". Maven support (m2e) marks src/test/groovy as "Contains test sources".

test sources

The test sources feature offers an interesting opportunity for Groovy AST transforms, extension methods, etc. -- since a two-stage build process now exists within a single project. In the past, if you wanted to create and use AST transforms, it was recommended to use 2 separate projects. In Eclipse Photon, AST transforms could be defined in a non-test source folder and applied in a test source folder of the same project.

Move "Groovy Type Checking" submenu items to "Groovy" submenu

The project context menu has been consolidated, reorganized and updated.

Groovy submenu

In previous releases, the two separate submenus looked like this:

Groovy submenu (old)

Groovy Type Checking submenu (old)

Improvements to Compiler Configuration support

Compiler config script is no longer applied to project resources outside of source folders as well as non-compiled sources (see Groovy > Compiler > Groovy Script Folders). By default, this means any *.dsld and *.gradle scripts will not have the project's config script applied. And it should mean the config script is not applied to itself any longer, making editing of the script much easier. Content Assist and Organize Imports also show improved support for the addition of imports through compiler configuration.

Improvements to Debugger perspective

Several usability improvements have been made for debugging. Class creation breakpoints and field read/write watchpoints have been implemented. Breakpoints can be set for Groovy classes in the Class File Viewer. Method enter/exit breakpoints have been fixed. Debug commands Run to Line (Ctrl+R) and Step into Selection (Ctrl+F5) have been fixed.

Breakpoint types

Improvements to code completion of constructors and methods

Each of the Groovy content assist preferences and the most popular/relevant Java content assist preferences have been tried in combination to ensure support in the Groovy editor is on par with the JDT. The two-state preference "Use guessed arguments for method calls" has been replaced by three-state preference "Fill method arguments and show guessed arguments" provided by JDT. A convenient link has been added to the Groovy > Editor > Content Assist preference page to get to Java's Content Assist preferences.

Constructors can now be completed with or without argument insertion or guessing. Necessary import statements or qualifiers are inserted. And anonymous inner classes can be started quickly by triggering a constructor proposal with {. Methods that have a SAM type for their last parameter can be completed with a Closure literal that includes parameters matching the SAM signature by triggering a proposal with {. Named argument completions do not include trailing ", " any more. The tables below summarize Java and Groovy behavior with different preference and triggering combinations.

Completions for construtors

Completions for sort method

Completions for sort method

Improvements to code completion of groovy.lang.Closure parameters

Methods with a trailing closure received a code completion boost as well. In more cases, a closure literal is inserted in idiomatic fashion -- "Place trailing closure arguments after closing parenthesis" is now on by default -- to encourage Groovy coding practices. The "it" parameter has been removed and replaced with smarter cursor positioning and selection, saving keystrokes and supporting the builder pattern.

Completions for collect method

Completions for collect method

Improvements to groovy.lang.DelegatesTo and groovy.transform.stc.ClosureParams support

Support for @DelegatesTo(type='pack.Type') was completed. All forms of this annotation should work properly now.

Completions for DelegatesTo annotation

Support for @ClosureParams(value=SomeHint, options=[...]) has been added. The conflictResolutionStrategy attribute is not yet supported.

Completions for ClosureParams annotation

Completions for ClosureParams annotation

Improvements to Extension Method (aka DGM) discovery

In conjunction with the changes to use @DelegatesTo and @ClosureParams to replace static lists with runtime discovery of type information, Default Groovy Methods (DGMs) are now being discovered from each project's classpath. This allows changes to DGMs between Groovy versions to be seen and leveraged. And third-party DGMs now have first-class support in content assist and type inferencing.

Improvements to DSLDs for built-in AST transforms

DSLD suggestions for NamedVariant AST transform

DSLD suggestions for Newify AST transform

Improvements to type inferencing and semantic highlighting

Conditional or terminal blocks with assignments

def m1(def x) {
  def cl = { ->
    x = 1
  }
  x // typeof(x) == Object because Closure is not executed
}
def m2(def x) {
  if (predicate()) {
    x = 1
    return 0
   }
  x // typeof(x) == Object because conditional block does not share path here
}
def m3(def x) {
  if (x instanceof CharSequence) {
    x = Integer.valueOf(x) // typeof(x) == CharSequence
  }
  x // typeof(x) == LUB(Object,Integer)
}
def m4(def x) {
  if (predicate()) {
    x = ''
  } else {
    x = new StringBuffer()
  }
  x // typeof(x) == LUB(String,StringBuffer)
}

Methods from java.lang.Class and java.lang.Object

Method toString was inferencing as Class.toString() in:

String[] arr = ...
def str = Arrays.toString(arr)

Method getMethod was showing as unknown (underlined) in:

def m = String.getMethod('toLowerCase')

Property superclass was showing as unknown (underlined) even though hover shows javadoc for Class.getSuperclass in:

Class clazz = String
def parent = clazz.superclass

Method call Chars.equals was showing as unknown (underlined) and hover showed javadoc for Object.equals in:

class Chars {
  static boolean equals(char[] a, char[] b) {
  }
  static void main(char[] x, char[] y) {
    if (Chars.equals(x, y)) {
    }
  }
}

SAM types and groovy.lang.Closure literals

SAM types in assignments, coercions and method parameters can be used to determine closure parameter types.

@FunctionalInterface
interface Sam {
  int meth(int a, Long b, java.util.regex.Pattern c);
}

def util(Sam s) {}

// for each: typeof(a) == int, typeof(b) == Long, typeof(c) == Pattern
util { a, b, c -> ... }
Sam type = { a, b, c -> ... }
def type = { a, b, c -> ... } as Sam

Return type from groovy.lang.Closure

The type of arr is dependent on the return type of the closure expression. length, group, and matches were showing as unknown (underlined) in:

Matcher[] meth() {}
def arr = with {
  return meth()
}
arr.length
arr[0].group(0)
arr[0].matches()

Traditional varargs and pseudo-varargs (last param is array) methods

Variadic method call with multiple overloads was showing as first overload, not best match in:

Arrays.sort() // sort(Object[])
Arrays.sort(new Object()) // sort(Object[])

Content assist for array length

Implicit "length" field for arrays is available as a code completion and correctly inferences as type int.

Content assist for inner types and enum constants

Content assist for inner classes and enum constants has been improved, including discovery with or without outer-class qualifiers. Code completion includes necessary imports or qualifiers depending on content assist preference.

Content assist for catch and throws clauses

Throwable types received a relevance boost for content assist within catch and throws clauses.

Content assist for assignment expressions

Content assist for non-declaration assignment expressions has been improved; parser error recovery has been added. This includes the combined operation assignments like +=, &=, etc. An assignment like foo = | or foo += | now supports correct code completion proposals.

Content assist for ternary operator expressions

Content assist for ternary operator expressions (? :) has been improved to allow completion proposals for def str = condition ? String.val|. Previously this would have caused an unrecoverable parser error, preventing content assist proposals.

Resolved Issues

  • 328: Formatter not wrapping function calls
  • 359: Missing code assist while typing a ternary operator
  • 365: Code assist does not add necessary qualifier for use of constant in type annotation
  • 367: Guessed enum values proposed without qualification when invoking a method
  • 369: Add import or organize imports choice dialog not restricted to annotation types when proposing choices for an annotation
  • 370: Fix compatibility between Buildship/Gradle and Groovy 2.5
  • 374: Code assist does not add necessary "this" qualifier when completing property proposals in static context
  • 403: Import not added when using a nested class in current package
  • 404: No map-style constructor code assist with nested class
  • 405: Wrong code navigation with switch and def
  • 409: No code assist on map-style constructor call for property values
  • 410: Code assist completion with "{" and method with Closure as last argument
  • 412: Add support for Groovy 2.6
  • 414: Add support for @ClosureParams in type inferencing
  • 415: Improve support for @DelegatesTo in type inferencing
  • 418: Fix code completion for qualified elements in annotation
  • 419: Limit type proposals for Class annotation elements to T or subtypes of T
  • 420: Fix code hover/select for anon. inner override of varargs method
  • 426: Code completion proposals for Throwable types should have higher relevance within catch parameter
  • 428: Content assist proposal that adds import fails if config script or AST transform adds imports
  • 430: Incorrect organize imports result with config script or AST transform that adds static on-demand import
  • 435: Import favorite completions do not respect some Content Assist preferences
  • 438: Code completion for enum constant does not add necessary import or qualifier
  • 442: Class rename does not update generic references
  • 445: Named argument completion for methods with Closure as last parameter may produce syntax error
  • 451: Closure completion proposals missing for method pointer expression
  • 452: Code select missing for type in map constructor expression
  • 455: Add support for argument guessing in constructor completions
  • 456: Constructor and method context display not working
  • 460: Add support for inner type completions on qualified name expressions
  • 461: Add support for inner type completions on partially-qualified expressions w/o supporting import
  • 468: Find type references missing coercion expression
  • 470: Method context proposals not shown for static method call expressions
  • 473: No warning for source unit with missing package statement
  • 474: Add parser recovery for incomplete static import statement
  • 475: Do not propose synthetic closure types
  • 478: Code assist does not add necessary qualifier for use of inner type in type annotation
  • 482: Do not propose non-static members in static imports
  • 486: Move "Groovy Type Checking" submenu items to "Groovy" submenu
  • 489: Map-style contructor call not shown in call hierarchies
  • 490: Remove trailing ", " from map-style constructor call named argument proposals
  • 492: Groovlets causing "The declared package "" does not match the expected package" warning
  • 502: Unrecognized static method call from within closure
  • 506: Code select and semantic highlight of DGSM with non-static object expression is missing
  • 511: Semantic highlight of static method in GString is off by one
  • 512: Semantic highlight of static method is that of category method
  • 519: Constent UI freeze - unhandled event loop exception makes editor unusable
  • 520: Incorrect semantic highlight of field reference in field initializer expression
  • 521: Improve flow typing support for closures, instanceof and terminal blocks
  • 522: Improve flow typing support for conditional blocks
  • 523: Improve flow typing support for methods with closure parameters
  • 524: Fix code hover/select for array length field
  • 525: Fix type inference for static toString methods (and others found on java.lang.Class)
  • 538: Fix type inferencing for variadic Class methods
  • 539: Fix type inferencing of static member imports that also are DGM names
  • 544: Cannot add breakpoints in groovy class from jar file
  • 545: Incorrect semantic highlight of static import property access
  • 546: Remove local AST transform filtering/switching
  • 549: performing organize imports results in error
  • 551: Array length field completion proposal is missing
  • 552: Load the Default Groovy Method types from project classpath
  • 557: Add support for Run To Line in debugger
  • 558: Add support for class load breakpoints
  • 559: Add support for field read/write breakpoints (aka watchpoints)
  • 560: Fix support for method enter/exit breakpoints
  • 564: Failed to bootstrap GroovyClassLoaders when trying to open build.gradle file in non-Groovy Gradle master project with Groovy editor
  • 582: Workspace search breaks when running on openjdk-10
  • 584: Exception formatting a simple file
  • 588: Improve SAM type closure parameter type inferencing
  • 592: Getting code=10053 error while installing groovy-eclipse on Eclipse IDE (Oxygen) for Eclipse Committers
  • 593: Add completion support for new pattern attribute of Newify AST transform
  • 594: Java refactoring leads to OOM
  • 595: Fix type inference for static equals methods (and others found on java.lang.Object)
  • 596: Fix parameter completion proposals in empty method body
  • 597: DSLD meta methods and properties not restricted to free-variable position
  • 598: DSLD: AssignedVariable pointcut does not match at a start of an assigned closure
  • 600: DSLD: AssignedVariable pointcut does not match in non-declaring assignment
  • 602: DSLD pointcut hasArgument does not support variable expression name matching
  • 604: Add content assist for @NamedVariant, et al.
  • 605: Fix type inference of local variables vs. DSLD contributions
  • 613: DSLD: Context information popup highlights wrong parameter name in case of a trailing closure
  • 616: NullPointerException preventing Groovy compilation
  • 619: NPE in TraitHelper.isTrait
  • 621: Fix type inference for class instance methods when accessed as properties
  • 623: DSLD method proposals with positional and optional parameters showing incorrect name-type pairings
  • 625: Trailing closure content assist pref can produce strange replacement
  • 626: Trailing closure and use closure literals content assist prefs together produce strange selection
  • 627: Compiler config script should not apply to filtered scripts (incl. *.dsld and *.gradle)
  • 628: Documentation of DSLD not shown with Eclipse Photon
  • 629: Import source positions are inconsistent with JDT
  • 633: Fix content assist for method with Closure as last param and '{' as trigger character
  • 636: Organize imports does not remove explicit import that can be satisfied by config script import
  • 638: Fix DSLD type inferencing for map keys
  • 643: Fix content assist for constructor with Closure as last param
  • 644: Fix type inferencing for pseudo-varargs method like Arrays.toString
  • 645: DSLD annotatedBy pointcut does not account for collector annotations
  • 646: Fix type inferencing for multiple method overloads (static and non-static)
  • 647: Organize imports does not retain type import used to disambiguate multiple star imports
  • 648: Position of meminitial and memmax on comand line
  • 650: Fix content assist for DSLD method with SAM type as last param and '{' as trigger character
  • 651: Mock field proposed for setter has void type
  • 653: Add support for code select of anonymous inner class type name
  • 657: Fix type inferencing for resolve strategy Closure.DELEGATE_ONLY
  • 658: Fix DSLD type inferencing for resolve strategy != Closure.DELEGATE_FIRST

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

2.9.2

Greclipse 2.9.2 was released on January 4th 2018.

New and Noteworthy

Support for new versions of Groovy

  • Groovy 2.5.0 new
  • Groovy 2.4.13 new
  • Groovy 2.3.11
  • Groovy 2.2.2
  • Groovy 2.1.9
  • Groovy 2.0.8
  • Groovy 1.8.9

InvokeDynamic flavor included starting with 2.5. Package exports in bundle manifests have been corrected. Several past fixes have been backported to all supported runtimes. Source jars for embedded BSF and Ivy jars have been added where missing and the linkages are made properly so Eclipse sees them.

Support for new versions of Eclipse

  • Eclipse Photon (4.8) pending
  • Eclipse Oxygen (4.7)
  • Eclipse Neon (4.6)
  • Eclipse Mars (4.5)

All other supported versions were patched up to the most recent state of their respective maintenance branches.

Support for Java 9 and JUnit 5

As of Eclipse Oxygen SR1a and Photon M3, Java 9 and JUnit 5 are fully supported within the IDE. Either can be combined with any supported version of Groovy.

All plug-in tests migrated to JUnit 4

Test cases can be run individually. Set up and tear down chains are easy to understand. @Ignore, @NotYetImplemented and @Parameterized are supported for tests. And all the other benefits of JUnit 4 over JUnit 3.8 are available.

UI plug-in tests migrated to Groovy

Closures. List and map literals. Multi-line strings for inline Groovy/Java sources. And all the other benefits of Groovy.

Icons for files, views, wizards, features, and the editor tab

Icon comparisons

JDT overlay icons are used on source file icons to provide a familiar look and feel. Overlays are applied to the lower-left corner to leave room for other decorations like class type (upper-right corner -- abstract, interface, etc.) and source control status (lower-right corner).

Preferences layout and persistence

Many of the Groovy preference nodes have been moved under Editor. Individual content assist preferences have been moved from Groovy to Content Assist and have been reworded for improved clarity of purpose.

Workspace preferences changes

Persistence of the global Groovy Classpath Container preference has been fixed. Restore Defaults on the project's Groovy Compiler page works properly for any permutation of preference values. JUnit monospace font preference has been restored to working condition.

Organize Imports clean-up action

Organize Imports (Ctrl+Shift+O) has been stabilized and now works for types appearing in many more places in a source file, incl. casts, coercions, generics, annotations, throws clauses, catch parameters, for-each parameters, etc. Also, support for static imports has been added. Organize Imports can viably be enabled as a Save Action for a project now. It will not run if the source unit has a syntax error.

Previews for all quick assists

Groovy Editor quick assists (Ctrl+1) show a preview of the proposed change to prevent you from being surprised. The preview pane is the same as the Java Editor provides for many of its quick assists. Insertions are indicated with boldface.

Quick Assist Preview for Extract to local variable

Add Import for selection editor action

Add Import (Ctrl+Shift+M) has been fully realized. This action converts a fully-qualified expression like java.util.regex.Pattern.compile('123') to import static java.util.regex.Pattern.compile and compile('123'). And it can be used to look up unresolved types and present a choice dialog in the case of multiple matches. Add Import now respects your import order and semicolon preferences as well.

Convert accessor to property editor action and quick assist

Replace method call with property expression (Ctrl+Shift+,) has been added to the Groovy Editor > Source context menu as well as the quick assist menu. This action converts foo.getBar() to foo.bar and foo.setBar(X) to foo.bar = X.

Convert def to inferred type quick assist

Replace dynamic type (aka def keyword) with inferred type has been added to the quick assist menu. This new action leverages the power of the type inferencing engine. The declared type may be many steps removed from your local variable, so it may be quicker to type def and then use the quick assist.

Quick Assist for Replace with inferred type

Convert local variable to field support for scripts

Quick assist for converting local variable declarations to field declarations has been enhanced to convert locals to fields in scripts using the @Field transform.

Convert to multi-line string support for concatenation sequences

Quick assist for converting single-line string literals has been enhanced to convert a string concatenation sequence to a multi-line string as well. Simply select the sequence (or place the caret adjacent to the last + operator) and choose "Convert to multi-line string" from the Quick Assist (Ctrl+1) menu. If the selected expression includes any non-string expressions, they will be inlined into a multi-line GString expression and embedded newline characters will cause the multi-line string to start a new line.

So, for example:

    'one\n' +
    'two\n' +
    System.currentTimeMillis()

becomes:

   """one
   two
   ${System.currentTimeMillis()}"""

Support for Compiler Configuration

Support for per-project compiler config scripts has been added to the Eclipse UI, Eclipse CLI and Maven compilers. This replaces the unpublished and experimental property-based greclipse.extraImports and greclipse.customizerClassesList features.

Groovy compiler project preferences

Groovy compiler configuration script

This example leverages the automatic import of CompilerCustomizationBuilder's static member withConfig -- available since Groovy 2.1. More examples of compiler configuration are discussed in the Groovy 1.8 and Groovy 2.1 release notes.

Note: Before editing your config script, you may want to disable it for the project or use the plain-text editor. The Groovy Editor will apply the script even when editing the script itself.

Support for Type Filters, Content Assist Favorites, and Build Access Rules

Support for JDT's classpath features has been improved. Java Type Filters (Window > Preferences > Java > Appearance > Type Filters) are fully supported in the Groovy Editor when performing content assist or organizing imports. Favorites (Window > Preferences > Java > Editor > Content Assist > Favorites) are also supported for content assist of variable expressions. Lastly, Build Access Rules inclusions and exclusions are supported when resolving types.

Improvements to groovy.lang.DelegatesTo annotation support

Previous releases supported the basic @DelegatesTo(Type) form for improved editor support of methods that accept a Closure. The @DelegatesTo attributes value=DelegatesTo.Target, target='name', strategy=n and genericTypeIndex=n are all supported. type='pack.Type' support is stubbed out, but not finished. Note: @ClosureParams remains unsupported.

Improvements to source folding

Rules for source folding have been fixed or enhanced to support folding of static initializers, multi-line closures, and multi-line comments within scripts.

Folding of closures and initializers

Folding of script comments and members

Improvements to script outline

Grapes can be seen in the Outline view. Toolbar filters have been enabled to match the Java view. Script members are more accurately represented.

Outline view of script grapes and members

Improvements to type inferencing and semantic highlighting

The type inferencing/code visitation engine has received a number of upgrades. Code hover/select works for most occurrences of a type, field, method or property in a source file. Code hover on packages in fully-qualified names has been added. Code hover/select on keywords and operators has been suppressed. Support for @TypeChecked and @CompileStatic transformations has been improved. In general, code hover/select should now work in the Groovy Editor much the same as it does in the Java Editor.

The improvements to inferencing/visitation have a trickle down effect on many related features, including Semantic Highlighting, Content Assist, Quick Assist, Refactoring and more. Specifically for highlighting, support for a number of syntax elements has been added, fixed or improved:

  • traits
  • number literals
  • map constructors
  • anon. inner classes
  • closures in closures
  • annotation attributes
  • fields versus accessors
  • parameters and variables
  • category (aka Groovy) methods
  • methods accessed as properties
  • overloaded and @Memoized methods
  • @Lazy and script @Field fields, incl. initializers
  • @CompileStatic and @TypeChecked classes and methods

Semantic highlighting 2.9.2 versus 2.9.1

This sample compares 2.9.2 (on the left) to 2.9.1 (on the right). There are differences on most lines. Notice especially in the Date map constructor that 2.9.2 shows the year and month properties as deprecated and the day property as unknown. And in the same block, use and daylightSavingsOffset are indicated as category methods, not just plain methods.

This next sample shows special highlighting of a regular expression with inline comments -- available for slashy and dollar-slashy strings.

Semantic highlighting of regular expressions

Improvements to DSLDs for built-in AST transforms

DSLD suggestions for Category AST transform

DSLD suggestions for Newify AST transform

DSLD suggestions for Newify AST transform

DSLD suggestions for SelfType AST transform

DSLD suggestions for Sortable AST transform

DSLD suggestions for Singleton AST transform

Concurrent modification exceptions in the DSLD subsystem have been corrected with proper synchronization of data structures.

Annotations included in JDT model

Prior versions of Greclipse had a few special-case checks to support @Test and @RunWith for JUnit/Spock. But most annotations on Groovy types, fields, and methods were not visible to the JDT tooling. In this release, all annotations are represented fully in the JDT model. This allows full support for errors/warnings against annotations, as well as suppressions using @SuppressWarnings. And things like null safety checks (@NonNull, @Nullable, etc.) work properly.

Content assist for annotations

Annotation types can be completed starting from just an @. Attribute names and values can be completed within an annotation's parentheses. And annotation collector annotations are recognized as annotations for content assist and type inferencing -- once compiled they are actually plain classes in the type system.

Content assist for annotations

Previously, CompileDynamic would not be listed in content assist for an annotation context and it would have shown with a C icon in content assist for a type.

Content assist for assignment statements

Content assist for local variable assignment statements has been improved to allow completion proposals for Type name = |. Previously this would have caused an unrecoverable parser error, preventing content assist proposals.

Content assist for method pointer and field access operators

Content assist for method pointers (.& operator) has been added and direct field access (.@ operator) has been improved.

Content assist for method pointers

Content assist templates

Built-in templates for use blocks, JUnit 4, and GContracts have been added. Duplicate ID issues have been fixed.

Resolved Issues

  • 400: Document how to use compiler config script in maven
  • 402: Missing reference in Call Hierarchy (probably due to the use of generics)
  • 401: Using source 1.8 triggers a Java 9 dependency and fails compilation
  • 398: Working set references broken in setup
  • 388: Missing incoming/outgoing decorations in Synchronize View for Groovy files
  • 373: Invalid reference detected by Call Hierarchy
  • 393: "Assign statement to new local variable" quickfix producing a compilation error when "return" is present
  • 387: Type inference problem on sort().each()
  • 371: Missing code assist in static method with @CompileStatic
  • 379: Import not updated for nested enum class
  • 372: Wrong call detected on Date.parse(String, String)
  • 383: Field initializer anonymous inner class fouling up type inferencing / semantic highlighting
  • 378: Method not recognized when invoked from an anonymous inner class
  • 377: Nested closure loses reference to delegate of the outer closure
  • 155: Upon save of editor: "Save Failed: assertion failed"
  • 368: Wrong method call detected when chaining two calls
  • 375: Conflict with servlet-api
  • 366: Wrong detection of field vs setter access within closure
  • 360: Missing code assist within 'with' closure in static method
  • 293: Inconsistent code formatting of closures (with input parameters) assigned to instance fields
  • 363: Wrong navigation for a delegate field inside a 'with' closure
  • 362: Import declaration not added when requesting a constructor completion for a class in a different package
  • 358: Camel-case code assist not working for property name completion in map-style constructor invocation
  • 361: Missing code assist trigger with dot ('.') when referencing an object within a 'with' closure
  • 357: Can't open Grails views: "Editor could not be initialized"
  • 331: Missing suggestion for property name completion in map-style constructor invocation code assist
  • 265: Add support for Java 9 to Groovy-Eclipse Maven plugin (aka batch compiler)
  • 353: Support custom compiler annotations
  • 343: Groovy JUnit test causes UI freeze when Run As context menu is opened
  • 161: Add support for InvokeDynamic (indy)
  • 344: Static type checking errors on maven compile
  • 346: Wrong completion for constructor code on a generic class
  • 347: Navigation not working
  • 318: Eclipse Oxygen can not add Groovy-plugin along with Java 9
  • 327: Eclipse 4.7 hangs on every modification of code in groovy editor
  • 340: gmavenplus-plus plugin execution not covered since 1.6
  • 339: UI Freezes
  • 338: Slow Java Searches
  • 335: Struggling to compile java code with annotation processor produced generated-sources
  • 174: Issue GROOVY-6899 is present in currently deployed 2.4 compiler
  • 138: Does not support annotationProcessors (in Maven POM)
  • 332: No suggestion for map-style constructor invocation by code assist when the class being constructed is written in Java
  • 330: Missing property suggestion in map-style constructor invocation code assist when such property is defined just by its setter
  • 329: Missing Groovy references in Call Hierarchy and Search for References when method invoked through an interface
  • 312: Step over continues to next breakpoint
  • 325: Internal compiler error: java.lang.IllegalArgumentException building mixed Java 8 and Groovy 2.4
  • 267: Assignment pointcut access inside DSLD
  • 323: NullPointerException at JDTAnnotationNode.java:176 with Eclipse Neon
  • 308: Compiler error for function with static return type
  • 322: Refresh dependencies failed
  • 192: src/test/groovy disappearing from the classpath when updating maven project
  • 191: Groovy main/test folders not added as source folders
  • 130: Import maven project in workspace: 'configure->convert to groovy project' not available
  • 321: Unable to resolve groovy source in test files
  • 320: Cannot switch groovy compiler level
  • 317: "org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry object" in Eclipse 4.7
  • 319: Could not find jline in class path when Run As Groovy Shell
  • 316: The 'Groovy Code Completions' proposal computer from the 'org.codehaus.groovy.eclipse.codeassist.completion' plug-in did not complete normally
  • 315: Auto Complete Error
  • 314: unable to install in Neon 3
  • 306: Groovy-Eclipse Type Inferencing: Error visiting method run in class xxx
  • 313: Misspelling in message displayed
  • 303: DSLD tests are not executed for snapshot builds
  • 292: Missing code assist in method invocation when no closing bracket present
  • 304: Allow contributions to DSLD Classpath Container
  • 301: NoSuchMethodException in GroovyExtraInformationHover.extraDocAsHtml
  • 122: editor has spurious "abstract method" error on trait methods
  • 286: Missing code assist in map-style constructor
  • 287: Wrong code assist order in method call completion
  • 288: Poor experience with code assist
  • 266: Red exclamation mark on build.gradle files
  • 123: Incompatibility between Eclipse Code Recommenders and Groovy-Eclipse (restart helps)
  • 290: Inconsistent Groovy completion in Default Proposals content assist if only Java Proposals (Code Recommenders) is enabled
  • 289: Enable type-aware code assist in map-style constructor call
  • 190: Provide Eclipse-Installer/Oomph .setup file for groovy-eclipse development
  • 302: GroovyCompletionProposalComputer is unable to return any proposals due to incorrect completion expression
  • 297: Update setup-based development instructions
  • 285: The literal -1 of type int is out of range
  • 284: Can't install on Spring Tool Suite
  • 283: PDE build for Mars.2 and Groovy-eclipse
  • 281: Bamboo CI builds need repairs
  • 277: When I install this plugin, gradle scripts show up with an Error icon.
  • 278: confused by annotations on enum values
  • 280: Source code for groovy-all (still) not available
  • 276: java.lang.NoSuchFieldError: EMPTY_ARRAY error in code navigation and completion with groovy compiler 1.8.9
  • 273: Can't install m2e connector in Eclipse Luna
  • 275: file associations question
  • 187: How to run a groovy script at generate-source phase
  • 183: Compile only groovy files
  • 156: incremental compiler erroneously removes AST annotations from fields
  • 270: Custom AST transformation classes broken
  • 257: Eclipse Neon.2 release due to conflicts cannot install groovy-eclipse m2e
  • 271: Can't open files since last update
  • 274: file associations error
  • 268: BigDecimal is not Visible
  • 178: ast transformation doesn't work in groovy-java project
  • 264: Blank edit control on neon.1
  • 262: Unable to compile a maven project since groovy-eclipse feature update
  • 261: Cannot complete the install because one or more required items could not be found
  • 176: compiler lies about indirectly referenced type can not be resolved
  • 166: Compiler does not respect Build Path Access Rules
  • 136: Compiler fails on using Constants within annotations
  • 158: No way to enable static type checking on the compiler in maven
  • 116: Lost many key bindings and quick-outline doesn't present dialog
  • 125: Cannot use eclipse annotation-based null analysis
  • 115: Double-clicking Spock def name in JUnit results view fails to recognize the method name
  • 134: $NON-NLS$ in lambda statement used as argument does not work
  • 143: groovy-eclipse does not work on Mars SR1
  • 139: Braces not correctly matched in Groovy due to closures
  • 146: Grails 3.1.0.M2 and Eclipse Mars: Groovy:Could not find class for Transformation Processor org.grails.compiler.injection.test.TestForTransformation declared by grails.test.mixin.TestFor
  • 179: Internal groovy compiler error: !== unexpected NullpointerException in Traits.decomposeSuperCallName
  • 185: Failure executing groovy-eclipse compiler
  • 260: Aliases can not be used in annotations
  • 259: Field is ambiguous in annotation but fine in class or script body
  • 256: Static class literal in annotation value shows false compilation error
  • 258: Internal groovy compiler error
  • 250: GroovyEditor.updateOccurenceAnnotation blocks Eclipse UI thread for no reason
  • 249: org.codehaus.groovy.eclipse.refactoring fails to start
  • 254: -Werror flag not recognized by groovy-eclipse-compiler
  • 255: Run as Groovy Script stopped working after installing newest snapshot plugin
  • 209: IntelliSense not working properly in build.gradle: computeCompletionProposals() took too long
  • 180: Eclipse-neon new parentheses formatter support doesn't work after installing groovy-eclipse
  • 251: Building project with multiple grabs in different files takes an extremely long time to build (sometimes 3-5 min and sometimes eclipse just gets stuck at buildingWorkspace)
  • 252: AST nodes for an empty script contains incorrect line & column numbers in Eclipse
  • 234: Eclipse 4.6.1 hangs during content assitent on static methods on not yet imported classes
  • 253: Groovy-Eclipse breaks java refactoring (extract to local var)
  • 248: Code formatting requires selection of code to be formatted
  • 240: Creation of element failed - Groovy Class
  • 245: Statically imported fields causing compile error in annotation arrays values
  • 213: NPE throw with Neon.1a Release (4.6.1) Type Parameter formatting preferences
  • 182: Internal compiler error: java.lang.ArrayIndexOutOfBoundsException: -1 at org.eclipse.jdt.internal.compiler.codegen.StackMapFrame.addStackItem(StackMapFrame.java:92)
  • 147: Autocomplete doesn't work on Java Annotations
  • 159: Compiler settings "See here" opens Codehaus termination page
  • 229: Compilation error when using Eclipse Neon with Plugin Development and with Enabled Null Anotations
  • 244: Change of Bundle-ClassPath in Manifest.MF of org.codehaus.groovy.eclipse.ant breaks headless build with ANT
  • 235: Type mismatch for java files
  • 201: Groovy Eclipse is incompatible with Eclipse Full(Eierlegende Wollmilchsau) Installations
  • 181: JDT code status of Groovy (integration of fixes)
  • 153: Plugin settings UI points to the codehaus docs
  • 128: Save actions fails with ClassNotFound error
  • 114: e44: JDT watch won't apply when building a custom product
  • 120: Source code of Groovy-all is not available by default for 2.1.8, 2.2.2 and 2.3.3
  • 124: @Grab Annotations in eclipse not working
  • 126: GGTS freezing on opening any Groovy file
  • 132: Modification exception in ImmutableClassNode.enableWriteProtection(...)
  • 135: Groovy-Eclipse breaks "Call Hierarchy" and "Find Method References" functions in Eclipse
  • 149: Plug-in 'org.codehaus.groovy.eclipse.ui' contributed an invalid Menu Extension (Path: 'org.eclipse.ui.projectConfigure' is invalid): org.codehaus.groovy.eclipse.addnature.action
  • 150: AST transformations can't add nodes with AnnotationCollectors
  • 144: Issue with Generic Method
  • 142: Update formatter to bring in line with Eclipse Mars SR1
  • 154: Code assist internal error caused by NullPointerException in TypeInferencingVisitorWithRequestor.visitBinaryExpression()
  • 148: Groovy Eclipse throwing StackOverflowError: null at org.codehaus.groovy.control.GenericsVisitor.getPrintName
  • 168: Greclipse prevent the use of the new Mars.2 (or even Mars.1) JDT code
  • 184: Eclipse Neon dark theme issues
  • 231: "Correct Indentation" results in ClassCastException in log
  • 233: Compilation error on annotation parameters
  • 239: wrong indentation of single statement ifs/etc
  • 232: NullPointerException in AnnotationBinding.java
  • 237: weird compile error for groovy script
  • 223: Eclipse 4.6.1 hangs sometimes during code proposal
  • 162: Dependent Projects with multiple source and output folders not handled (on Mars SR 1)
  • 193: java.lang.NoClassDefFoundError: org/eclipse/jdt/groovy/search/TypeInferencingVisitorWithRequestor$1Helper
  • 194: Parameter type is ambiguous in Java5.java
  • 177: Static imports are overwritten when using content assist
  • 205: NoopCleanUpsAction causes memory leak
  • 224: Issue with @AnnotationCollector
  • 204: Groovy: Arbitrary code execution Version < 2.4.5
  • 206: java.lang.NoClassDefFoundError: org/codehaus/jdt/groovy/integration/LanguageSupportFactory
  • 195: Plugin causes issues on indentation when generating methods
  • 141: Incorrect call hierarchy
  • 186: Missing source folders are added to classpath
  • 188: Compiler error when compiling against JRE 8
  • 172: eclipse 4.5.2 SubMonitor error
  • 121: Support Groovy 2.4.x
  • 112: Switching to Groovy compiler 2.4.1.xx-201502281941-e44 does not work
  • 106: Missing Javadoc for Groovy in the Eclipse IDE
  • 21: Fix compatibility with 4.3.2 Java 8
  • 19: NPE when code completing Groovy in Eclipse
  • 4: Groovy 2.1.2 appears to fix a critical issue in generics

Update Sites

Use one of the following update sites depending on your version of Eclipse:

Archives of these update sites are also available:

2.9.1

Greclipse 2.9.1 was released on November 18th 2014.

Resolved Issues

The full list of issues resolved for this release:

Highlights

Support for New Versions of the Groovy Compiler

This release of Groovy Eclipse supports the following versions of Groovy

  • Groovy 2.0.7
  • Groovy 2.1.8
  • Groovy 2.2.2
  • Groovy 2.3.7 New

The Groovy 2.3 and 2.1 compiler come installed by default. The Groovy 2.0 and 2.2 compiler can be installed separately from the release update site.

Java 8 Support

Groovy Eclipse is now compatible with Java 8. To use Java 8 and Groovy together you need to use the Groovy 2.3 compiler on Eclipse 4.4.

Extended map support

Map keys are highlighted as strings in map initialization expression.

Map key highlighting screenshot

The type of map values accessed in Groovy style can be inferred.

Map value type inference screenshot

Quick fixes

New quick fix is added for type imports:

Import type screenshot

And for class casting:

Add cast screenshot

Type casting

No need for type casting inside instanceof blocks.

Map value type inference screenshot

Type inference

Several problems with type inference were fixed for generic methods and closure parameters.

Closure parameter type inference screenshot

Formatting

Some of renaming and indentation issues were fixed.

Content assist

Content assist support was added for static imports:

Content assist for static imports screenshot

Proposals order now adjusted to become more handy:

Content assist order screenshot

Compilation

Some annoying problems with classpath and incremental builds were resolved.

Release Update Sites

Use one of the following update sites depending on your version of Eclipse:

Zipped archives of these update sites are also available:

2.9.0

Greclipse 2.9.0 was released on Thursday, July 17th, 2014.

Resolved Issues

The full list of issues resolved for this release:

Highlights

Support for New Versions of the Groovy Compiler

This release of Groovy Eclipse supports the following versions of Groovy

  • Groovy 2.0.7
  • Groovy 2.1.8
  • Groovy 2.2.2 New
  • Groovy 2.3.4 New

The Groovy 2.3 and 2.1 compiler come installed by default. The Groovy 2.0 and 2.2 compiler can be installed separately from the release update site.

Java 8 Support

Groovy Eclipse is now compatible with Java 8. To use Java 8 and Groovy together you need to use the Groovy 2.3 compiler on Eclipse 4.4.

Traits

Groovy Eclipse now supports Traits with the Groovy 2.3 compiler. A trait is like an interface and can be implemented by your classes. However, Traits can also have fields and methods. Multiple Traits can be composed onto a class without using multiple inheritance and avoiding the "diamond problem".

traits screenshot

More details about traits can be found in the Groovy 2.3 docs.

Support for @AnnotationCollector

Greclipse now supports the use of 'AnnotationCollector' GRECLIPSE-1719 The AnnotationCollector tranfsform allows creating annotations that serve as aliases for a group of one or more other annotations.

AnnotationCollector screenshot

Content Assist

Content assist is more accurate, it now considers method argument types rather than just the number of arguments GRECLIPSE-1573.

Was:

Content Assist screenshot 2

Now:

Content Assist screenshot 1

Release Update Sites

Use one of the following update sites depending on your version of Eclipse:

Zipped archives of these update sites are also available:

Clone this wiki locally