-->

Invoke intellij code formatter programmatically on

2019-07-09 02:17发布

问题:

How can I programmatically invoke intellij's java source code formatter on an arbitrary source file on disk?

I don't mind writing a plugin to do this but if there is a way to invoke the formatter from command line that would be great!

Thanks

回答1:

I ended up writing my own plugin which is available on github. Note that it might need some more fine tuning