Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTerence Evans
1,870 PointsClean Up This Mess Challenge - Reformat code does nothing in InteliJ IDEA.
The Reformat code does nothing in InteliJ IDEA. Nor do any of the neat tricks Craig showed us in the Local Development Environment section. Is there a key or option I need to engage?
2 Answers
Andrew Winkler
37,739 PointsAre you following these appropriate steps?
To reformat code for the current file, follow these steps:
In the editor of the currently opened file, press Ctrl+Shift+Alt+L. Note that if you select Code 1) Reformat Code from the main menu or press Ctrl+Alt+L, IntelliJ IDEA will try to reformat the source code automatically without opening the Reformat File dialog. 2) In the Reformat File dialog, specify options for the reformatting and click Run.
Brian Farley
1,274 PointsI had the same issue at first. I forgot the.java extension on my file name, After adding that, the reformat worked fine.