[ 
http://jira.codehaus.org/browse/QDOX-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183289#action_183289
 ] 

Robert Scholte edited comment on QDOX-172 at 7/11/09 2:28 PM:
--------------------------------------------------------------

ok, seems like you expected the literal representation, but that's not what 
this method does. It builds a codeblock based on the model of the javaSource. 
In the model this kind of information is all lost. And keeping it goes far 
beyond the purpose of QDox.

>From your javadoc-mojo point of view I can imagine you want something like 
>this ;) Keep the code the as much as possible, only append javadoccomments 
>where they're missing.
You could of source build your own method without the full qualified names, but 
what if someone used a FQN of the class in the method: the code might not 
compile...
Since you're already rewriting sourcefiles I don't think it's wrong to use full 
qualified names. This way you're sure the code will compile.
And I think for the indent-stuff, you could bring it up to an even higher 
lever. Make use of a codestyler (mojo-parameter?) to reformat the complete 
sourcefile.

edit:
take a look at http://mojo.codehaus.org/jalopy-maven-plugin/index.html for 
inspiration


      was (Author: rfscholte):
    ok, seems like you expected the literal representation, but that's not what 
this method does. It builds a codeblock based on the model of the javaSource. 
In the model this kind of information is all lost. And keeping it goes far 
beyond the purpose of QDox.

>From your javadoc-mojo point of view I can imagine you want something like 
>this ;) Keep the code the as much as possible, only append javadoccomments 
>where they're missing.
You could of source build your own method without the full qualified names, but 
what if someone used a FQN of the class in the method: the code might not 
compile...
Since you're already rewriting sourcefiles I don't think it's wrong to use full 
qualified names. This way you're sure the code will compile.
And I think for the indent-stuff, you could bring it up to an even higher 
lever. Make use of a codestyler (mojo-parameter?) to reformat the complete 
sourcefile.


  
> Preserve method signature and indentation in AbstractJavaEntity#getCodeBlock()
> ------------------------------------------------------------------------------
>
>                 Key: QDOX-172
>                 URL: http://jira.codehaus.org/browse/QDOX-172
>             Project: QDox
>          Issue Type: Sub-task
>    Affects Versions: 1.9.1, 1.9.2
>            Reporter: Vincent Siveton
>
> The AbstractJavaEntity#getCodeBlock() change the method signature, see the 
> test case of QDOX-171:
> Original snippet
> {noformat}
>     public String myMethod( String s )
>         throws Exception
>     {
> {noformat}
> getCodeBlock()  snippet
> {noformat}
> public java.lang.String myMethod(java.lang.String s) throws 
> java.lang.Exception {
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to