1:设置注释的模板:
下载此模板:codetemplates.xml
搜索dangzhang,将其改为你自己的姓名,保存
打开eclipse/myeclipse
选择 window-->preferences-->java-->code-->code templates 右边点import 选择你写好的模板.xml文件导入进去即可
2:设置格式化的模板:
格式化模板:eclipse-formatter.xml
格式化模版方法同上,只是不是选择code templates ,而是选择formatter。
3:保存时自动格式化代码:
打开eclipse/myeclipse
选择 window-->preferences-->java-->editor-->save actions
右边选中:perform the selected actions on save
format source code
format all lines
organize imports
保存后重启myeclipse即可。
如下图所示:
如对本文有疑问, 点击进行留言回复!!
【奥鹏作业答案库网】大工20春《应用统计》在线作业1【奥鹏作业答案】
网友评论