設置Myeclipse中的代碼格式化、註釋模板及保存時自動格式化

1:設置註釋的模板:web

下載此模板:  codetemplates.xmleclipse

搜索Dangzhang,將其改成你本身的姓名,保存code

打開eclipse/myeclipse
選擇 window-->Preferences-->JAVA-->Code-->Code Templates 右邊點Import 選擇你寫好的模板.xml文件導入進去便可orm

2:設置格式化的模板:xml

格式化模板:eclipse-formatter.xmlblog

格式化模版方法同上,只是否是選擇Code Templates ,而是選擇Formatter。ip

3:保存時自動格式化代碼:get

打開eclipse/myeclipse
選擇 window-->Preferences-->JAVA-->Editor-->Save Actions 右邊選中:it

Perform the selected actions on saveio

Format source code

Format all lines

Organize imports

保存後重啓Myeclipse便可。

以下圖所示:

相關文章
相關標籤/搜索