选中需要进行格式化的代码--->右键--->source--->format,就可以将代码格式化了。 转载于:https://www.cnblogs.com/wyhluckdog/p/10139696.html