用Myeclipse开发项目是,自动生成注释十分方便快捷,但我们希望自动生成自己的名字和一些内容,同时团队开发过程中会出现每个人注释格式不一致等问题。
下面介绍如果通过修改Myeclipse注解模板解决问题。
本人Myeclipse常用的设置,可按需要作相应修改
-----------------------------------------------------
1. 类的版权注释格式及设置步骤方式:
Eclipse -> Window -> Preferences -> Java -> Code Style -> Code Templates -> Code -> New Java files -> Edit
2.类的注释格式及设置步骤如下:
Eclipse -> Window -> Preferences -> Java -> Code Style -> Code Templates -> Comments -> Types -> Edit
3.类的方法注释格式设置方式:
Eclipse -> Window -> Preferences -> Java -> Code Style -> Code Templates -> Comments -> Methods -> Edit
下面介绍如果通过修改Myeclipse注解模板解决问题。
本人Myeclipse常用的设置,可按需要作相应修改
-----------------------------------------------------
1. 类的版权注释格式及设置步骤方式:
Eclipse -> Window -> Preferences -> Java -> Code Style -> Code Templates -> Code -> New Java files -> Edit
- /*
- * Copyright (c) 2010-2020 Founder Ltd. All Rights Reserved.
- *
- * This software is the confidential and proprietary information of
- * Founder. You shall not disclose such Confidential Information
- * and shall use it only in accordance with the terms of the agreements
- * you entered into with Founder.
- *
- */
- ${filecomment}
- ${package_declaration}
- ${typecomment}
- ${type_declaration}
2.类的注释格式及设置步骤如下:
Eclipse -> Window -> Preferences -> Java -> Code Style -> Code Templates -> Comments -> Types -> Edit
- /**
- * This class is used for ...
- * @author jseven1989
- * @version
- * 1.0, ${date} ${time}
- */
3.类的方法注释格式设置方式:
Eclipse -> Window -> Preferences -> Java -> Code Style -> Code Templates -> Comments -> Methods -> Edit
- /**
- * ${tags}
- * @author jseven1989
- */