1. Idea安装Eclipse code formatter 插件

设置 --> plugins --> eclipse code formatter --> 安装

Idea使用Eclipse的代码格式

2. 配置代码格式模板

设置 --> Other Settiings --> Eclipse Code Formatter 

Idea使用Eclipse的代码格式

使用的配置的xml
https://download.csdn.net/download/u011359903/12417928

相关文章: