Very simple:
- select the root of your module in the project view
- in the code menu, select "Reformat ..."
EDIT
Forgot to mention this important detail:
IDE Settings> Code Style> Java> Wrapper and Brackets> Ensure Right Margin Is Not Exceeded
need to check. (at least for formatting java files, the same checkbox for other files exists)
ben75 source
share