Is there a way to automatically remove trailing spaces in Eclipse?
I see there are nice functionality in Source like Correct Indentation and Format.
But they dont remove trailing spaces.
PS: What other functionalities of this kind you use to make the code nicer?
It's available as a Save action, at least. (I can't see it under the formatter options.)
Go to Window / Preferences, Java / Editor / Save Actions. Tick "Additional Actions" and click on Configure. In the "Code Organizing" tab, the first option is "Remove trailing whitespace".
Note that this will remove all trailing whitespace from Java files - not just those you've touched. If you're working with people who don't remove trailing whitespace, this can be messy in terms of later doing a diff.