java - Eclipse comment auto-generation -
for programming course, i'm required put comments within each class , method describing following 5 things: methods, fields, methods on fields, parameters, , methods on parameters. first 3 put directly under class heading, , last 2 specific each method.
below example of these comments should like.
class conslostring implements ilostring { /* * methods: * - string converttostring(); * - string formatstring(); * fields: * - string first; * - ilostring rest * methods on fields: * - string methods * - ilostring methods */ string first; ilostring rest; ... naturally, tedious , redundant type these out every single class , method in large file. there way generate these automatically, in eclipse or otherwise?
i've looked eclipse's java editor template variables there doesn't seem way iterate on every method/field in class within eclipse's template editor.
any appreciated!
in eclipse, go window ->preferences -> java -> code style -> code templates on right hand side, click on code style expand, click on methods - , in bottom , check check box says : automatically add comments new methods , types. can same fields also.
i haven't seen anywhere way trying document java classes. if want : see this, , search java classspy classmember field method . can directly take classspy.java class link , compile , execute classspy.class : java classspy conslostring field method - print fields, methods output. copy output , use whatever way want.
Comments
Post a Comment