[jira] [Updated] (GROOVY-9546) Annotations on class signature are rendered incorrectly

2020-05-11 Thread Paul King (Jira)


 [ 
https://issues.apache.org/jira/browse/GROOVY-9546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King updated GROOVY-9546:
--
Fix Version/s: 3.0.4
   4.0.0-alpha-1

> Annotations on class signature are rendered incorrectly
> ---
>
> Key: GROOVY-9546
> URL: https://issues.apache.org/jira/browse/GROOVY-9546
> Project: Groovy
>  Issue Type: Bug
>  Components: GroovyDoc
>Affects Versions: 3.0.3
>Reporter: Damir Murat
>Assignee: Paul King
>Priority: Minor
> Fix For: 4.0.0-alpha-1, 3.0.4
>
> Attachments: image-2020-05-10-17-42-34-810.png, 
> image-2020-05-10-17-47-00-858.png
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> When I have an annotated class, generated groovydoc contains a link to the 
> annotation and appended annotation name just after it as in following 
> screenshot:
> !image-2020-05-10-17-47-00-858.png!
> After some debugging, I managed to fix the issue by modifying
> {code:java}
> org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html.annotations(){code}
> like this:
> {noformat}
> def annotations = { t, sepChar ->
> // t.annotations() ? t.annotations().collect{ it.isTypeAvailable() ? '@' 
> + linkable(it.type().typeName()) + (it.description() - 
> ('@'+it.type().typeName())) : it.description()}.join(sepChar) + sepChar : ''
> t.annotations() ? t.annotations().collect{ it.isTypeAvailable() ? '@' + 
> linkable(it.type().typeName()) : it.description()}.join(sepChar) + sepChar : 
> ''
> }
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (GROOVY-9546) Annotations on class signature are rendered incorrectly

2020-05-10 Thread Damir Murat (Jira)


 [ 
https://issues.apache.org/jira/browse/GROOVY-9546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Damir Murat updated GROOVY-9546:

Description: 
When I have an annotated class, generated groovydoc contains a link to the 
annotation and appended annotation name just after it as in following 
screenshot:

!image-2020-05-10-17-47-00-858.png!

After some debugging, I managed to fix the issue by modifying
{code:java}
org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html.annotations(){code}
like this:
{noformat}
def annotations = { t, sepChar ->
// t.annotations() ? t.annotations().collect{ it.isTypeAvailable() ? '@' + 
linkable(it.type().typeName()) + (it.description() - 
('@'+it.type().typeName())) : it.description()}.join(sepChar) + sepChar : ''
t.annotations() ? t.annotations().collect{ it.isTypeAvailable() ? '@' + 
linkable(it.type().typeName()) : it.description()}.join(sepChar) + sepChar : ''
}
{noformat}
 

  was:
When I have an annotated class, generated groovydoc contains a link to the 
annotation and appended annotation name just after it as in following 
screenshot:

!image-2020-05-10-17-47-00-858.png!

After some debugging, I managed to fix the issue by modifying
{code:java}
org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html.annotations(){code}
like this:
{noformat}
*no* further _formatting_ is done here
def annotations = { t, sepChar ->
// t.annotations() ? t.annotations().collect{ it.isTypeAvailable() ? 
'@' + linkable(it.type().typeName()) + (it.description() - 
('@'+it.type().typeName())) : it.description()}.join(sepChar) + sepChar : ''
t.annotations() ? t.annotations().collect{ it.isTypeAvailable() ? '@' + 
linkable(it.type().typeName()) : it.description()}.join(sepChar) + sepChar : ''
}
{noformat}
 


> Annotations on class signature are rendered incorrectly
> ---
>
> Key: GROOVY-9546
> URL: https://issues.apache.org/jira/browse/GROOVY-9546
> Project: Groovy
>  Issue Type: Bug
>  Components: GroovyDoc
>Affects Versions: 3.0.3
>Reporter: Damir Murat
>Priority: Minor
> Attachments: image-2020-05-10-17-42-34-810.png, 
> image-2020-05-10-17-47-00-858.png
>
>
> When I have an annotated class, generated groovydoc contains a link to the 
> annotation and appended annotation name just after it as in following 
> screenshot:
> !image-2020-05-10-17-47-00-858.png!
> After some debugging, I managed to fix the issue by modifying
> {code:java}
> org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html.annotations(){code}
> like this:
> {noformat}
> def annotations = { t, sepChar ->
> // t.annotations() ? t.annotations().collect{ it.isTypeAvailable() ? '@' 
> + linkable(it.type().typeName()) + (it.description() - 
> ('@'+it.type().typeName())) : it.description()}.join(sepChar) + sepChar : ''
> t.annotations() ? t.annotations().collect{ it.isTypeAvailable() ? '@' + 
> linkable(it.type().typeName()) : it.description()}.join(sepChar) + sepChar : 
> ''
> }
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)