IntelliJ IDEA 13.1.0 Web Help

This part concerns the issues related to Groovy, and IntelliJ IDEA's specific techniques that become available when Groovy support is enabled.

In this section:

Note

Make sure that the desired SDK is downloaded and installed on your computer, and the libraries are properly configured.

Also, make sure that Groovy plugin is enabled in IntelliJ IDEA. The plugin is bundled with IntelliJ IDEA and activated by default. If the plugin is not enabled, enable the plugin.

Groovy Support

Note

IntelliJ IDEA supports Groovy up to version 2.0.

Groovy files are marked with fileTypeGroovy icon.

Groovy support includes:

  1. Possibility to create Java modules with Groovy facet.
  2. Ability to create an extension module to support custom extension methods.
  3. Coding assistance:
    • Code completion for keywords, labels, variables, parameters and functions.
    • 11.1+ Chained expression completion.
    • Error and syntax highlighting.
    • Code formatting and folding.
      12.0+ 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.
    • 13.1+ Ability to check what generics to specify for a method call or for a type variable using Parameter info (Ctrl+P).
  4. Code generation
    • 11.1+ Inserting, expanding, and generating code blocks using live templates.
    • Creating various applications elements via intention actions.
    • Possibility to create line and block comments (Ctrl+Slash or Ctrl+NumPad /Ctrl+Slash or Ctrl+NumPad /Ctrl+Slash or Ctrl+NumPad /Ctrl+Slash or Ctrl+NumPad /Alt+SemicolonCtrl+Slash or Ctrl+NumPad /Ctrl+Slash, Ctrl+NumPad / or Ctrl+ColonCtrl+Slash, Ctrl+NumPad / or Ctrl+Shift+CCtrl+Slash or Ctrl+NumPad /Command Slash or Command NumPad /Command Slash or Command NumPad /Command Slash or Command NumPad //Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+Slash, Ctrl+Shift+NumPad / or Ctrl+Shift+ColonCtrl+Shift+Slash or Ctrl+Shift+NumPad /Ctrl+Shift+SlashAlt Command Slash, Alt Command NumPad /, Control Shift Slash, Control Shift NumPad /, Shift Command Slash or Shift Command NumPad /Control Shift Slash, Control Shift NumPad /, Shift Command Slash or Shift Command NumPad /Control Shift Slash).
  5. Common and specific refactorings.
  6. Numerous ways to navigate through the source code, among them:
    • Navigating with Structure View.
    • Navigate | Declaration (Ctrl+B, Ctrl+Button1 Click or Button2 ClickCtrl+B, Ctrl+Button1 Click or Button2 ClickCtrl+B, Ctrl+Button1 Click or Button2 ClickCtrl+B, Ctrl+Button1 Click or Button2 ClickCtrl+Alt+G, Escape, Period, Alt+Period or Ctrl+Button1 ClickCtrl+B, Ctrl+Button1 Click or Button2 ClickF12, Shift+F2, Ctrl+B, Ctrl+Button1 Click or Button2 ClickCtrl+B, Ctrl+Button1 Click or Button2 ClickF3 or Ctrl+Button1 ClickCommand B, Command Button1 Click or Button2 ClickCommand B, Command Button1 Click or Button2 ClickF3 or Control Button1 Click).
    • Navigate | Implementation (Ctrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+Alt+B or Ctrl+Alt+Button1 ClickCtrl+T or Ctrl+Alt+BAlt Command B or Alt Command Button1 ClickAlt Command B or Alt Command Button1 ClickAlt Command B or Alt Command Button1 Click) from overridden method / subclassed class.
  7. Advanced facilities to search through the source code.
  8. Viewing reference information.
  9. Possibility to generate documentation, created according to GroovyDoc syntax.
  10. Possibility to compile mixed Groovy and Java code.
  11. Running and debugging.
  12. Possibility create, and perform tests.
  13. Access to a Groovy console in any Java project (Tools | Groovy Shell).

See Also

Concepts:

External Links:

Web Resources: