Reputation: 59
I have been trying to generate customised comments for JavaScript code in eclipse. For that I am using templates. I want to get following function name and arguments inside my comments.
Here is my template code:
/** @method [@public|@private|@protected] [return-type] ${enclosing_method} ${enclosing_method_arguments}
* @brief
* @param ${enclosing_method_arguments}
* @retval ${return_type}
*/
Here is my Output when I try to generate template for a method:
/** @method [@public|@private|@protected] [return-type] enclosing_method enclosing_method_arguments
* @brief
* @param ${enclosing_method_arguments}
* @retval ${return_type}
*/
function sub(a,b){
c=a+b;
return c;
}
Here is what I want:
/** @method [@public|@private|@protected] int sub(a,b)
* @brief
* @param a
* @param b
* @retval c
*/
function sub(a,b){
c=a+b;
return c;
}
Any help will be appreciated :)
Thanks in advance.
Upvotes: 1
Views: 71