Preferences->Java->Editor->Save Actions->Configure…
You can configure the removal of unused imports when saving from the Unnecessary Code tab.
Adding imports would normally be done as you are writing the code otherwise it won’t compile.
This is how it looks like: 