Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is Gradle autocomplete in IDEA?

I am using Gradle 2.3 inside of IntelliJ IDEA 15 CE and Android Studio 1.3.2 and have always wondered what the situation is with gradle autocomplete / syntax highlighting etc.

When I look at a build.gradle file most of the code is dark gray and underlined, even keywords like task giving Cannot resolve symbol 'task'.

enter image description here

Coming from using Java in IDEA I find it disorientating and I would expect that types (like Javadoc) would be click through-able and auto-complete would offer me relevant stuff (like the methods and properties of Javadoc when inside the above task).

It would also be great if I could enumerate the source sets for this build file via autocomplete at the sourceSets., which I appreciate may need gradle to have executed the config build step to provide this info.

Am I missing something obvious or is Gradle tooling inside IDEA just not as good as the Java equivalents?

Thanks!

like image 230
Dori Avatar asked Nov 10 '15 15:11

Dori


People also ask

How do I enable autocomplete in IntelliJ?

By default, IntelliJ IDEA displays the code completion popup automatically as you type. If automatic completion is disabled, press Ctrl+Shift+Space or choose Code | Code Completion | Type-Matching from the main menu. If necessary, press Ctrl+Shift+Space once again.

Where is Gradle tool window in IntelliJ?

IntelliJ IDEA usually provides lots of different ways to navigate to something we need. To open the Gradle tool window we can: Click on the quick access button in the bottom left, and click Gradle. Or, if you have the Tool Window Bars open already, you can click on the Gradle button in the top right.


1 Answers

It could be Cucumber for Groovy plugin. As I know Gradle use some techniques and syntax of Groovy, so I tried to install some Groovy plugins and success at the first try.

enter image description here


Steps to install this plug in:

  • on MacOS: Preferences... -> Install JetBrains plugin... -> Cucumber for Groovy.


enter image description here


like image 86
Think Twice Code Once Avatar answered Nov 16 '22 03:11

Think Twice Code Once