Reputation: 267077
Whenever I create a new Java file in Eclipse and check off the option to add public static void main(String args[])
, this code is generated:
public class Test {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
How do i:
@param args
commentUpvotes: 35
Views: 31808
Reputation: 61
Upvotes: 6
Reputation: 28752
Also make sure you check "Use code formatter" in Java > Editor > Templates
Upvotes: -1
Reputation: 18035
The indention is a formatting issue while the comments is a template issue.
The templates are in Window -> Preferences -> Java -> Code Style -> Code Templates. Browse all of them and look for the things you would like to change.
The Formatter is a little bit more complicated. You find it under Window -> Preferences -> Java -> Code Style -> Formatter. There are tons of options there but I'll just answer your question.
Upvotes: 54
Reputation: 402
To configure it go to the : window->preferences->java->code style->code templates
Upvotes: 1
Reputation: 12782
Eclipse has a lot of configuration options. Take a look in the Windows | Preferences dialog (or the Eclipse Preferences pan on OSX).
If you dig deep enough - you'll find the options under Java | Code Style.
Upvotes: -1