eclipse設置代碼模板和格式


該設置可以在保存文件時自動根據模板調整代碼格式。

首先准備華為代碼格式化文件:

FEFO-Formatter.xml

FEFO-codetemplates.xml

設置格式
Preferences-Java-Code Style-Formatter,右側Import...FEFO-Formatter.xml文件
設置模板
Preferences-Java-Code Style-Code Templates,右側Import...FEFO-codetemplates.xml文件
設置保存動作
Preferences-Java-Editor-Save Actions
右側勾選以下選線:
Perform the selected actions on save Format source code Format all lines Organize imports



 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM