Reputation: 95
Is there any way by which i can generate method headers in eclipse?
Eg:If i already have a method in my code:
public void doSomething(String name,String age){
}
Expected OP
/*
*This method does something
*@param name name of employee
*@param age age of employee
*/
public void doSomething(String name,String age){
}
Upvotes: 5
Views: 7072
Reputation: 117685
RIGHT CLICK
--> Source
--> Generate Element Comment
or just click on Shift + Alt + J
Upvotes: 2
Reputation: 17649
There are several ways to do this:
Rightclick -> Source -> Generate Element Comment
to generate Javadoc comments in your editor windowThe templates for these comments can be customized in the template section of the preferences:
Window -> Preferences
and then Java -> Code Style -> Code Templates
Upvotes: 7
Reputation: 12548
Type
/**
Enter
Afterwards Eclipse will generate you a default java-doc.
Upvotes: 9