In Settings go to Code Style, select Java, and make sure you are using Project settings