收录日期:2021/02/27 21:03:23 时间:2009-03-14 20:00:44 标签:osx,intellij-idea

I can't seem to get "Reformat Code" to work on my mac version of Intellij. I'm using a 30 day trial.

Update & Clarification;

It doesn't do anything, there is no reformatting done at all.

Thanks

Works fine for me. Maybe you are using a file type not being supported to reformat. But for usability the reformat option should be deactivated in that case. You may contact the IntelliJ IDEA team (and hope to get service for your trial). Or if you think that it's a bug, file a report or make an enhancement request.

Turns out I had an issue

I had a directory structure which contained "Source" such as

/my/Path/To/**Source**/My/web/Project/Source/

This confused Intellij, which prevented it from reading my directory structure correctly. Because of this, my real "source" directory wasn't identified. Without my *.java files stored within a defined "source" directory, Intellij didn't know how to format my files. I had incorrectly assumed that Intellij would know simply by the file extension.