In the main menu → select "Code" → "Convert Code" or press Ctrl + Alt + L.
In the Conversion Code dialog box, specify the reformatting area: Current file. The selected text. All files in the current directory, including or omitting subdirectories. You can also enable import optimization by selecting the Optimize import checkbox, which is enabled only for the current directory. Click Run.
source share