How to change auto-generated code when creating new class in Eclipse

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.

  • Templates -> Comments -> Methods -> Edit and delete everything
  • Formatter -> Edit -> Braces Tab -> Change which situations you want
  • Templates -> Code -> Method Body -> Edit and delete everything

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)