现在的位置: 首页 > 综合 > 正文

eclipse3.4中设置新建文件注释格式收藏

2018年02月01日 ⁄ 综合 ⁄ 共 1500字 ⁄ 字号 评论关闭

window-->Preference-->java-->CodeStyle-->CodeTemplates-->Code-->New Java Files
在Patten里面输入你的类型,比如:

  1. /* 
  2.  * $$RCSfile: ${file_name},v $$ 
  3.  * $$Revision: 1.1  $$ 
  4.  * $$Date: ${date}  $$ 
  5.  * 
  6.  * Copyright (C) 2005 Bettem, Inc. All rights reserved. 
  7.  * 
  8.  * This software is the proprietary information of Bettem, Inc. 
  9.  * Use is subject to license terms. 
  10.  */  
  11.   
  12. ${filecomment}  
  13. ${package_declaration}  
  14.   
  15. ${typecomment}  
  16.   
  17. /** 
  18.  * <p>Title: ${type_name}</p>  
  19.  * <p>Description: </p>  
  20.  * <p>Copyright: Copyright (c) 2006</p>  
  21.  * @author lihan 
  22.  * @version 1.0 
  23.  */  
  24.   
  25. ${type_declaration}  

则新建java文件时候:

 

  1. /* 
  2.  * $RCSfile: OracleCon.java,v $ 
  3.  * $Revision: 1.1  $ 
  4.  * $Date: 2009-2-16  $ 
  5.  * 
  6.  * Copyright (C) 2005 Bettem, Inc. All rights reserved. 
  7.  * 
  8.  * This software is the proprietary information of Bettem, Inc. 
  9.  * Use is subject to license terms. 
  10.  */  
  11.   
  12. package dao;  
  13.   
  14.   
  15. /** 
  16.  * <p>Title: OracleCon</p>  
  17.  * <p>Description: </p>  
  18.  * <p>Copyright: Copyright (c) 2006</p>  
  19.  * @author lihan 
  20.  * @version 1.0 
  21.  */  
  22.   
  23. public class OracleCon {  
  24.  public static void main(String[] args)  
  25.  {  
  26.     
  27.  }  
  28.   

抱歉!评论已关闭.