Velocity
  1. Velocity
  2. VELOCITY-695

Add comments for directive parameters

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.x
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None

      Description

      Add comments for Macro definitions so this type of thing is possible:

      #macro(foo ## This is a comment about foo
      $bar ## This is the bar parameter

        1. It has man uses
          $bar2 ## Another param
          )
          #end

        Activity

        Hide
        Jarkko Viinamäki added a comment -

        Urgh. -1 for this one. I don't see why anyone would want to write templates like that.

        Just put the parameter description before the macro definition in comments JavaDoc style.

        Show
        Jarkko Viinamäki added a comment - Urgh. -1 for this one. I don't see why anyone would want to write templates like that. Just put the parameter description before the macro definition in comments JavaDoc style.
        Hide
        Byron Foster added a comment -

        You seem to be saying that you don't like the aesthetics of documenting this way so you want to force everyone else not to do it also?

        Show
        Byron Foster added a comment - You seem to be saying that you don't like the aesthetics of documenting this way so you want to force everyone else not to do it also?
        Hide
        Jarkko Viinamäki added a comment -

        I don't like this change because the value of this "feature" vs. the implementation effort, documentation effort, potential new bugs, ugliness of that approach in general etc. are not in balance.

        Show
        Jarkko Viinamäki added a comment - I don't like this change because the value of this "feature" vs. the implementation effort, documentation effort, potential new bugs, ugliness of that approach in general etc. are not in balance.
        Hide
        Byron Foster added a comment -

        Fair enough, does the balance change any given that the implementation effort is done. And now you only have bugy & ugly ?

        Show
        Byron Foster added a comment - Fair enough, does the balance change any given that the implementation effort is done. And now you only have bugy & ugly ?
        Hide
        Nathan Bubna added a comment -

        I think that so long as someone else does/did the work, i'm fine with this. Other languages allow it, and i think it reasonable for a user to expect this to work. Of course, like Jarkko, i wouldn't ever use it. Javadoc style is better.

        Show
        Nathan Bubna added a comment - I think that so long as someone else does/did the work, i'm fine with this. Other languages allow it, and i think it reasonable for a user to expect this to work. Of course, like Jarkko, i wouldn't ever use it. Javadoc style is better.
        Hide
        Byron Foster added a comment -

        Better huu? Ok, looks like this is going in, so I'll close it. Change log update for this coming...

        Show
        Byron Foster added a comment - Better huu? Ok, looks like this is going in, so I'll close it. Change log update for this coming...

          People

          • Assignee:
            Unassigned
            Reporter:
            Byron Foster
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development