Eclipse: Can you format code on save?

前端 未结 4 1347
故里飘歌
故里飘歌 2020-12-04 08:31

In Eclipse, under Windows -> Preference -> Java -> Code Style, you can define code templates for comments and code, and you can s

4条回答
  •  心在旅途
    2020-12-04 09:22

    If you find that you do not have a Save Actions preference under Java--> Editor, it may be because you are using an older version of Eclipse. In that case you can install the Format on save plugin from here.

    Then, under Preferences, choose Java --> Format on save. Select the Run Format option under Select a code formatting action

提交回复
热议问题