关于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}
*/
版权声明: 本文为博主 网无忌 原创文章,欢迎转载,但请务必标注原文链接。
本文链接: https://www.cnblogs.com/netWild/archive/2010/11/30/1892388.html