关于myeclipse的模板及辅助设置,自用留存

1) JSP File Template :


<%  
/*  
 *------------------------------------------------------------------------  
 * Describe  :   
 * Author    : Z.MingYu (netwild)  
 * Update    : ${date} ${time}  
 * Email     : netwild@ITPlus.com.cn  
 * Copyright : (c) 2010-${year} ITPlus.com.cn. All rights reserved.  
 *------------------------------------------------------------------------  
*/  
%>  
<%@ page language="java" contentType="text/html; charset=${encoding}" pageEncoding="${encoding}"%>  
<%@ page import="java.util.*"%>  
<%  
//clear cache!  
response.setHeader("Pragma", "No-cache");  
response.setHeader("Cache-Control", "no-cache");  
response.setDateHeader("Expires", 1);  
 
//sys root path  
String rootPath = request.getContextPath();  
%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=${encoding}" />  
<meta http-equiv="Expires" content="0" />   
<title>JSP File</title>  
<script language="javascript" type="text/javascript" src="<%=rootPath%><!--  
/client/jsTool.jsp?enExt=false&enEditer=false">  
// --></script>  
</head>  
<body>  
${cursor}  
</body>  
</html> 

 

2) HTML File Template :


/*  
 *------------------------------------------------------------------------  
 * Describe  :   
 * Author    : Z.MingYu (netwild)  
 * Update    : ${date} ${time}  
 * Email     : netwild@ITPlus.com.cn  
 * Copyright : (c) 2010-${year} ITPlus.com.cn. All rights reserved.  
 *------------------------------------------------------------------------  
*/  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=${encoding}" />  
<meta http-equiv="Expires" content="0" />   
<title>HTML File</title>  
</head>  
<body>  
${cursor}  
</body>  
</html> 

 

3) JAVA Code Template :

 

Java > Code Style > Code Templates > Code > New Java Files


${filecomment}  
${package_declaration}  
/** 
* @descript : desc... 
* @author Z,MingYu (netwild) 
* @version :${date} ${time} 
*/  
${typecomment}     
${type_declaration}    

 

4) JAVA Method Comments :

 

Java > Code Style > Code Templates > Comments > Methods


/** 
 * @descript : desc... 
 * @category : method name 
 * @author : Z,MingYu (netwild) 
 * ${tags} 
 */ 

posted @ 2010-11-30 20:40  网无忌  阅读(375)  评论(0编辑  收藏  举报