1、下载阿里的p3c-formatter

2、选择【Window】-【Preferences】,打开设置页面

3、选择【Java】-【Code Style】-【Code Templates】,打开Code Templates设置页面

4、点击【Import】,选择eclipse-codetemplate.xml文件,导入

5、点击【Apply】

6、选择【Java】-【Code Style】-【Formatter】,打开Formatter设置页面

7、点击【Import】,选择eclipse-codestyle.xml文件,导入

8、点击【Apply and Close】
