设置Myeclipse中的代码格式化、注释模板及保存时自动格式化
2015-06-18 16:31
253 查看
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即可。
下载此模板: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即可。
相关文章推荐
- Spring验证小结和问题
- Java集合类ArrayList循环中删除特定元素
- 删除Eclipse多余的工作空间
- Spring定时任务的几种实现
- 安卓应用开发之eclipse新建安卓模拟器(虚拟机)
- springMVC绑定数据的方式
- java中volatile关键字的含义
- springmvc配置
- eclipse快捷键及各种设置
- eclipse 不自动弹出提示(alt+/快捷键失效) 快捷键
- Java-马士兵设计模式学习笔记-工厂模式-单例及多例
- Java 六种异常处理的陋习(转)
- 用java实现图片的缩放
- JavaSript模块规范 - AMD规范与CMD规范介绍
- java数据结题之-喝可乐的问题
- spring技术总结
- MVC项目搭建--Java1.7+Eclipse luna + Maven 3.2.5 +spring 4.1.4
- JavaEE中用response向客户端输出中文数据乱码问题分析
- java中的基本数据类型与封装类
- java基础将一个int数组转换成一个字符串