Is there an easy of adding a comment block (Javadoc style) to every method in an Eclipse project and possibly classes so I can fill in them later?
As suggested you can do it method-per-method (Source -> Generate element comment) or ALT+SHIFT+J
but I find it a very bad idea. Comments are only useful when they give an additional information. When you feel more information is needed add it.
Having comments on setters like "sets the value" or worse automatically generated comments it not useful at all.
To add a comment over the method select getUser or take the cursor before getUser and press ALT + SHIFT + J It will add the comment on top of your method
/*
* @param
* @return User
*/
public User getUser();
Under
Window | Preferences | Java | Code Style | Code Templates
you will find 2 features:
You can edit the generated comment block by use of eclipse variables or your static Javadoc text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With