Menu

Can't get tags (@param, @return) to work

Help
2009-09-21
2012-07-18
  • Wade Scholine

    Wade Scholine - 2009-09-21

    I can't get the @param and @return tags to generated documentation. The style
    I am accustomed to using looks like this:

    /// Create an instance of a command-line parser.

    /// @param Options array of const, the strings that options will match.

    /// If an option requires an argument, it should be suffixed with a ':'

    /// character.

    constructor Create(Options: array of const);

    What I get in the documentation is a Description section that has @param and
    @return in it, and the '#No TAG found in source code#' in the parameters and
    return tables.

    Shouldn't the style quoted here work?

     
  • TommyBrc

    TommyBrc - 2009-09-21

    Are you shure that you have configured the DelphiToDoc to generate
    documentation with /// ? Usually it would be something like {* for the start
    and } for the end of the hole documentation block, including the @param and
    @return.. otherwhise the DelphiToDoc does not know where the documentation
    block starts and where it ends.

    An other option could be to remove the empty line you have between the
    description of the constructor and the @param block.

    btw, you do not need to put the type of the param in the description. That you
    will see any way when the documentation is generated.

     
  • Wade Scholine

    Wade Scholine - 2009-09-21

    Yes, I am getting documentation, see my original post.

    I am getting the Description sections, all of the identifiers (classes,
    methods, fields, etc.) are getting recognized, it's just that the @param and
    @return tags are not getting distinguished from the Description.

     
  • TridenT

    TridenT - 2009-09-22

    Your comment block is unusual !

    Tommybrc mentionned it, DCTD is working today with block {* ... } for
    multiline description and /// for inline comments.

    I must admit I've never test to have multiple lines with /// and javadoc tags.

    So I will try to reproduce the issue, and if if it can be fixed only with
    configuration (but I don't think so). If not, I will fix it as it works
    partially as you said.

     
  • Wade Scholine

    Wade Scholine - 2009-09-22

    I'm accustomed to using this documentation style with Doxygen, which is why I
    wrote it that way. I'm currently using doxygen with pas2dox, but there are
    some issues with that.

    I'd really like to find a tool that works natively with Delphi...

     
  • TommyBrc

    TommyBrc - 2009-09-22

    Wade.. DCTD is fully compatible with Delphi. You just need to write all the
    documentations blocks within {*...}, includin param and return tags. If you do
    that, everithing else should work ok. For example, your documentation block
    would look like this:

    {* Create an instance of a command-line parser.

    @param Options array of const, the strings that options will match.

    If an option requires an argument, it should be suffixed with a ':'

    character. }

    constructor Create(Options: array of const);

    If you do this, it should work ok.

     
  • TridenT

    TridenT - 2009-09-23

    wadesc, I will try to fix it before the week-end, and I will notify here a new
    version to test.

     

Log in to post a comment.