1、首先打开【eclipse】软件,点击【Window】,如下图所示。
2、然后点击【Preferences】,如下图所示。
3、然后依次展开【Java】【Editor】,如下图所示。
4、然后点击【Save Actions】,如下图所示。
5、然后勾选【Perform the selected actions on save】,如下图所示。
6、然后勾选【Format source code】,如下图所示。
7、然后勾选【Format all lines】,如下图所示。
8、然后点击【Apply】按钮,点击【Apply and Close】按钮,如下图所示。