Invoke intellij code formatter programmatically on java files

不想你离开。 提交于 2019-12-12 21:24:24

问题


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



来源:https://stackoverflow.com/questions/26198057/invoke-intellij-code-formatter-programmatically-on-java-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!