[tools][eclipse]如何進行Code Style Formatter設置

来源:互联网 发布:mac ie浏览器 编辑:程序博客网 时间:2024/05/25 21:33

在 eclipse 中使用 快捷鍵 Ctrl + Shift + F 可以進行 format 操作。以下將進行相關的設置。


1. format 時 code style 的設置

這裡的format 可以進行設置,新建一個自己的code style:

Window-->Preferences --> Java--> Code style --> Formatter




2. 保存時自動format

也可以在保存的時候自動format,設置的地方為:

Window-->Preferences -->java->editor->Save Actions->Format Source Code

取消勾选,即取消了保存时自动格式化的功能。



0 0
原创粉丝点击