Sunday 5 April 2009

Eclipse : Save Actions for autoformatting code and updating imports

If you want Eclipse to automatically tidy up your list of import statements and indent your code each time you save:

1. Open Preferences

2. Go to Java > Editor > Save Actions

Select (tick) Perform the selected actions on save and choose "Format Source Code", "Organize imports" and [any] "Additional actions"

No comments: