[jira] Created: (QDOX-172) Preserve method signature and indentation in AbstractJavaEntity#getCodeBlock()

View: New views
6 Messages — Rating Filter:   Alert me  

[jira] Created: (QDOX-172) Preserve method signature and indentation in AbstractJavaEntity#getCodeBlock()

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.2, 1.9.1
            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



[jira] Commented: (QDOX-172) Preserve method signature and indentation in AbstractJavaEntity#getCodeBlock()

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Robert Scholte commented on QDOX-172:
-------------------------------------

Maybe it's me, but I can't see any difference in signature between the two snippets other than the Objects have FQN's and it's all on one line.


> 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



[jira] Commented: (QDOX-172) Preserve method signature and indentation in AbstractJavaEntity#getCodeBlock()

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Vincent Siveton commented on QDOX-172:
--------------------------------------

In the getCodeBlock() snippet the differences are

"*missing indentation* public"
"java.lang.String" instead of "String"
"myMethod(java.lang.String s)" instead of "myMethod( String s )"
no return of line
"throws java.lang.Exception" "instead of "throws Exception"


> 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



[jira] Commented: (QDOX-172) Preserve method signature and indentation in AbstractJavaEntity#getCodeBlock()

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Robert Scholte commented on QDOX-172:
-------------------------------------

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



[jira] Issue Comment Edited: (QDOX-172) Preserve method signature and indentation in AbstractJavaEntity#getCodeBlock()

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ 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



[jira] Closed: (QDOX-172) Preserve method signature and indentation in AbstractJavaEntity#getCodeBlock()

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/QDOX-172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Scholte closed QDOX-172.
-------------------------------

         Assignee: Robert Scholte
       Resolution: Won't Fix
    Fix Version/s: 1.10

The generated code is as intended. But I created another issue, QDOX-177, which might be closer to the feature you're requesting.

> 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
>            Assignee: Robert Scholte
>             Fix For: 1.10
>
>
> 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