Eclipse: Configure to Automatically Update Code Formatting on Saving
This tutorial shows you how to configure Eclipse to automatically clean up your code formatting anytime you save your code. Keeping your code formatting clean helps prevent mistakes and frustration, saving you time!
-
In Eclipse, choose Window menu > Preferences:
-
In the Filter text box, type save. Eclipse automatically updates the categories in your Preferences window:
-
Choose the Saved Actions category:
-
In the Saved Actions settings, do the following:
-
Check ON Perform the selected actions on save
-
Check ON Format source code
-
Select Format all lines
-
-
Hit the Apply and Close button to save your settings.