groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dogbert <virtualdogb...@gmail.com>
Subject Question about AST Transforms and @DelegatesTo
Date Fri, 02 Sep 2016 12:41:41 GMT
So I have a question about AST Transforms and @DelegatesTo, as it would
relate to AST transforms in a Grails plugin I wrote:
https://github.com/virtualdogbert/Enforcer

I don't think I can use @DelegatesTo as is, but, if I could figure out how
it works, could I write a new version of @DelegatesTo, that I could apply
to the parameters of an AST transform like:

https://github.com/virtualdogbert/Enforcer/blob/master/src/main/groovy/com/
virtualdogbert/ast/Enforce.groovy

https://github.com/virtualdogbert/Enforcer/blob/master/src/main/groovy/com/
virtualdogbert/ast/EnforceASTTransformation.groovy

So that I could convince an IDE like intellij that those closure parameters
delegate to a service class, so that when I use methods from that service
class or it's traits, the IDE wont mark them as unresolved.

Thank you for reading, and any help or direction you might provide.

-Tucker

Mime
View raw message