Window -> Preferences -> Java -> Editor -> Save Actions

[v] Perform the selected actions on save
  [v] Format source code
    (o) Format all lines
  [v] Organize imports


Posted by maysent
: