escaping "@" or creating a c...

Help
Anonymous
2012-02-29
2013-04-17
  • Anonymous - 2012-02-29

    up vote 0 down vote favorite
    share  share  share

    I Apologize if this is a newbie question, but I've been attempting to insert a custom Tag for a parameter output.

    Here's an example of code with the javadoc I'm attempting to generate using jAutodoc:

    /**
    * Description of the method blah_blah_blah
    * @param xyz description of xyz, its a number between 0 and 382
    * @example_xyz 5
    * @returns Integer
    ****/
    public String blah_blah_blah(Integer xyz){
    //… blah
    return xyz + 1
    }

    with the templates, I have not been able to output a custom tag (@customTag etc), it appears to only work for the defined tags @author, @param, etc… unless I put it on the same line as a defined one

    (this is possible)

    /****
    * description
    * @param p blah blah @customTag
    * @return blah
    *****/

    but not what we need, essentially, if any one can produce the following

    /****
    * description --
    * @param myParam
    * @customTag HURRAY!
    * @return 
    *****/

    javadoc using jAutodoc, thats all I need to know how to do.

    Maybe I have to escape the @? I've tried escaping it via \, \, /, //, quotes, #, '', etc… and also even attempted to put it on the same line as the @param, and see if I could insert a \n so it jumps down to the next line at evaluation time… (no luck)

    Thanks for the help in advance

     
  • Martin Kesting

    Martin Kesting - 2012-03-03

    Normally this should be no problem and you don't have to escape the @. The only thing is, that the custom tag will always appear after all other tags.

    Method:

    public int doSomething(int value) {
        return value + 42;
    }
    

    Modify the existing template with name

    Returns other

    :

    /**
     * ${e.g(2).rsfu()}.
     * 
     * @customTag HURRAY!
     * 
     * @return the ${e.g(1).rsfl()}
     */
    

    This will be the result:

    /**
         * Do something.
         *
         * @param value the value
         * @return the int
         * @customTag HURRAY!
         */
        public int doSomething(int value) {
            return value + 42;
    }
    
     
  • Anthony G

    Anthony G - 2012-03-12

    Thanks,

    I guess I may need to clarify, the tags i want to add are essentially what I have under "param"

    Like this:

    if I Had

    public int doSomething(int value) { return value + 42; }
    

    I'd want the Jautodoc to give me

    /**
    *
    @param value
    @example_value
    @return blah
    *
    **/

     
  • Martin Kesting

    Martin Kesting - 2012-03-13

    You are right. It's only possible to have the custom tag on the same line as the param tag. There is no workaround at the moment.

    You have to fill in the line break manually after generating the comment. But I would guess you you have to add your example value anyway!?

     
  • Anthony G

    Anthony G - 2012-03-13

    … yea, figured thats the only work around currently.  Better than nothing :)

    thanks

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks