1. Use the good source code formatter
You can define it by following these steps :
• go to Window -> Preferences , then select Java -> Code Style -> Formatter :
Unable to render embedded object: File (worddavf2057af4146c251acb647c366f78306b.png) not found.
• click on "Import", and select the file "eclipse_formatter.xml" from the svn repository *https://svn.petalslink.org/svnroot/trunk/infra/eclipse/* :
Unable to render embedded object: File (worddavf2057af4146c251acb647c366f78306b.png) not found.
• click on "Apply" to save.