Hi Paul,
Thanks for your reply. I found SimpleGroovyClassDocAssembler is enlightening.
The basic idea is to locate Field Node postion (line,column) and then extract
code snippet include comments between target field and previous Node.
I will try this method, and Grails compatible with Groovy3 w
Jiaxin,
Thanks, I will check it out.
And I also found this related post,
https://stackoverflow.com/questions/14354165/how-to-parse-groovy-code.
--
发件人:余佳昕
发送时间:2020年7月23日(星期四) 11:57
收件人:杨波 ; users-groovy
主 题:回复: How to extract
2.4.20:
https://bintray.com/groovy/Distributions/download_file?file_path=groovy-2.4.20.msi
2.5.13:
https://bintray.com/groovy/Distributions/download_file?file_path=groovy-2.5.13.msi
3.0.5:
https://bintray.com/groovy/Distributions/download_file?file_path=groovy-3.0.5.msi
-Keegan
Groovy has a groovydoc command. You could just run that and extract those
comments from the resulting output or look at the sourcecode for groovydoc
for inspiration.
>From Groovy 3, you can extract such comments from the AST. Versions of
Grails compatible with Groovy 3 are not too far away.
Cheers
I have written similar software for the company I work for. Java provides an
extensible javadoc API. I have not used it on groovy, but I think it should
apply. You can check this class to get started:
`com.sun.tools.javadoc.Main`
Jiaxin
-- --
??
Hello,
I am writing a grails swagger plugin that needs to extract comments of
class fields, such as below code:
class UserCommand {
/**
* The name of user in comments
*/
String username
String password
String avatarUrl
}
Then I need to extract the comment con
Dear community,
The Apache Groovy team is pleased to announce version 3.0.5 of Apache
Groovy.
Apache Groovy is a multi-faceted programming language for the JVM.
Further details can be found at the https://groovy.apache.org website.
This release is a maintenance release of the GROOVY_3_0_X branch.
Great news!
On Wed, Jul 22, 2020 at 6:28 AM Paul King wrote:
>
> Dear community,
>
> The Apache Groovy team is pleased to announce version 2.5.13 of Apache
> Groovy.
> Apache Groovy is a multi-faceted programming language for the JVM.
> Further details can be found at the https://groovy.apache.o