In Eclipse, go to Window > Preferences > Java > Code Style > Formatter and Import this file.
Then, go to Preferences > Java > Editor > Save Actions and check 'Perform the selected actions on save' , 'Format source code (format all lines)' and 'Organize Imports', then OK.