导航栏:File ---> Settings --->Plugins ---> Browse Repositories ; 搜索 Eclipse Code Formatter,安装该插件: 转载链接: https://blog.csdn.net/Gaomb_1990/article/details/80645335