Reputation: 542
Intellij's not helping to autocomplete or to recognize symbols for build.gradle, and I'm wondering if it's because groovy makes magic with its dsl and IntelliJ struggles to identify extensions.
I've created a simple example with an extension like this:
class DbConnectionsExtension {
public final NamedDomainObjectContainer<DbConnectionInfo> connections
DbConnectionsExtension(Project project) {
def objects = project.getObjects()
this.connections = project.container(DbConnectionInfo) {
name -> objects.newInstance(DbConnectionInfo.class, name)
}
}
void connections(Action<NamedDomainObjectContainer<DbConnectionInfo>> action) {
action.execute(connections)
}
void connections(Closure<Object> closure) {
connections.configure(closure)
}
}
And Intellij isn't able to recognize the connections field
In Github you can find all the code of the example.
Upvotes: 0
Views: 149
Reputation: 16381
Such navigation is not supported currently. Please vote for IDEA-197182 request.
Upvotes: 1