Programmatically Invoke Intellij's formatter on any Java source file

Answered

Is there a programmatic way of formatting any java file using intellij?

for example, I am expecting to do something like

format codestyle.xml A.java B.java, where format is a script that takes an intellij code style configuration (xml) and formats A.java/B.java as if invoking format code on these files inside of intellij IDE. thanks

Please sign in to leave a comment.