Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating JavaDoc comments for existing code in Eclipse

I know it's possible to generate comments for classes, interface, etc., in the wizard screen when creating them, but I haven't found an option to generate javadoc comments for an existing file. Is it possible?

Thanks.

like image 257
Amir Rachum Avatar asked May 04 '10 17:05

Amir Rachum


1 Answers

If you like to keep both hands on keyboard, then typing /** on the line before a method and pressing enter works too:

/**[press enter here]
int avg(int a, int b) throws ArithmeticException {
    ...
}

-->

/**
 * 
 * @param a
 * @param b
 * @return
 * @throws ArithmeticException
 */
int avg(int a, int b) throws ArithmeticException {
    ...
}
like image 131
COME FROM Avatar answered Oct 08 '22 07:10

COME FROM