Ajay
Ajay

Reputation: 977

Invoke intellij code formatter programmatically on java files

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

Upvotes: 2

Views: 1146

Answers (1)

Ajay
Ajay

Reputation: 977

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

Upvotes: 2

Related Questions