How to do code formatting in Eclipse Select the particular coded file- i means open that file and go to Source menu->click on Format