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
icon.
Groovy support includes:
- Possibility to create Java modules with Groovy facet.
- Ability to create an extension module
to support custom extension methods. -
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.
-
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; Ctrl+DivideCtrl+Slash; Ctrl+Divide/Ctrl+Shift+Slash; Ctrl+Shift+DivideCommand Shift Slash; Command Shift Divide; Command Shift Slash; Command Shift Divide).
- Common and specific refactorings.
-
Numerous ways to navigate through the source code, among them:
- Navigating with Structure View.
- (Ctrl+BCtrl+B).
- (Ctrl+Alt+BCtrl+Alt+B) from overridden method / subclassed class.
- Advanced facilities to search through the source code.
- Viewing reference information.
- Possibility to generate documentation, created according to GroovyDoc syntax.
- Possibility to compile mixed Groovy and Java code.
- Running and debugging.
- Possibility create, and perform tests.
- Access to a Groovy console in any Java project ().
