IntelliJ IDEA supports the following coding assistance for Groovy:

  • Code completion for keywords, labels, variables, parameters and functions.
  • Chained expression completion.
  • Error and syntax highlighting.
  • Code formatting and folding.

    For example, all closures that have their parameters described in the separate line are formatted the following way:

    def cl = {
    param1, param2 ->
    body()
    }
  • Numerous code inspections and quick-fixes.
  • Ability to check what generics to specify for a method call or for a type variable using Parameter info (Ctrl+P).
  • Code generation
    • Inserting, expanding, and generating code blocks using live templates.
    • Creating various applications elements via intention actions.
    • Possibility to create line and block comments (⌘/, ⌘NumPad /, ⌘/ or ⌘NumPad /⌘/, ⌘NumPad /, ⌘/ or ⌘NumPad /⌘/, ⌘NumPad /, ⌘/ or ⌘NumPad /^ Slash, ^ NumPad /, ^ Colon, ⌃/, ⌃NumPad /, ⌃:, ⌃/, ⌃NumPad / or ⌃:⌥ Semicolon, ⌥; or ⌥;/⌥⌘/, ⌥⌘NumPad /, ⌃⇧/, ⌃⇧NumPad /, ⇧⌘/, ⇧⌘NumPad /, ⌥⌘/, ⌥⌘NumPad /, ⌃⇧/, ⌃⇧NumPad /, ⇧⌘/ or ⇧⌘NumPad /⌃⇧/, ⌃⇧NumPad /, ⇧⌘/, ⇧⌘NumPad /, ⌃⇧/, ⌃⇧NumPad /, ⇧⌘/ or ⇧⌘NumPad /⌃⇧/ or ⌃⇧/^ ⇧ Slash, ^ ⇧ NumPad /, ^ ⇧ Colon, ⌃⇧/, ⌃⇧NumPad /, ⌃⇧:, ⌃⇧/, ⌃⇧NumPad / or ⌃⇧:^ ⇧ Slash, ^ ⇧ NumPad /, ⌃⇧/, ⌃⇧NumPad /, ⌃⇧/ or ⌃⇧NumPad /).
  • Ability to add annotations. For example, @Builder annotation. IntelliJ IDEA supports all Strategies from the standard library as well as code completion and navigation.

    groovy_builder_annotation

  • Expression Type action for Groovy expressions. Use ⌃⇧P or ⌃⇧P⌃⇧P or ⌃⇧P^ ⇧ P, ⌃⇧P or ⌃⇧P to see the expression type without clicking the mouse.

    groovy_type_expressions

See Also

Procedures:

Reference: