blob: 2855beea904650e03ca9ee15b6f1a7a910c949e9 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="Adobe RoboHelp 8">
<title>Code Templates Preferences</title>
<link rel="StyleSheet" href="default.css" type="text/css">
<style type="text/css">
<!--
body { border-left-style:None;
border-right-style:None;
border-bottom-style:None;
background-color:Transparent;
border-top-style:None; }
-->
</style>
<style type="text/css">
<!--
body { border-left-style:None;
border-right-style:None;
border-bottom-style:None;
background-color:Transparent;
border-top-style:None; }
-->
</style>
<script type="text/javascript" language="JavaScript">
//<![CDATA[
function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
origWidth = innerWidth;
origHeight = innerHeight;
onresize = reDo;
}
onerror = null;
//]]>
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute;
left:0px;
top:0px;
z-index:4;
visibility:hidden; }
p.WebHelpNavBar { text-align:right; }
-->
</style>
<script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
<script type="text/javascript" language="javascript" src="whver.js"></script>
<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
<script type="text/javascript" language="javascript1.2" src="whlang.js"></script>
<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
<script type="text/javascript" language="javascript1.2">//<![CDATA[
<!--
if (window.gbWhTopic)
{
var strUrl = document.location.href;
var bc = 0;
var n = strUrl.toLowerCase().indexOf("bc-");
if(n != -1)
{
document.location.href = strUrl.substring(0, n);
bc = strUrl.substring(n+3);
}
if (window.setRelStartPage)
{
addTocInfo("Reference\nPHP Preferences\nCode Style Preferences\nCode Templates Preferences");
addAvenueInfo("Reference","configuring_tunneling_debug_preferences.htm","formatter.htm");
}
document.write("<p style=\"text-align:left\"> ");
AddMasterBreadcrumbs("ide_help.htm", "", "&gt;", "Home", "pdt_table_of_contents.htm");
document.write("<a href=\"reference.htm\">Reference<\/a> &gt; <a href=\"preferences.htm\">PHP Preferences<\/a> &gt; <a href=\"code_templates_preferences.htm\">Code Style Preferences<\/a> &gt; Code Templates Preferences<\/p>");
if (window.setRelStartPage)
{
setRelStartPage("ide_help.htm");
autoSync(0);
sendSyncInfo();
sendAveInfoOut();
}
}
else
if (window.gbIE4)
document.location.reload();
//-->
//]]></script>
</head>
<body leftmargin="5" topmargin="5" rightmargin="5" bottommargin="5"><script type="text/javascript" language="javascript1.2">//<![CDATA[
<!--
if (window.writeIntopicBar)
writeIntopicBar(4);
//-->
//]]></script>
<div style="width: 100%; position: relative;" id="header">
<p align="right"><a
title="Documentation Survey" href="http://spreadsheets.google.com/viewform?formkey=dC1scEswTjFia2tDQ3Y5TVJBbkNQcWc6MQ">Documentation
Survey</a>
| <a href="javascript:crlf=&quot;&quot;;h=location.href;t=document.title;e = &quot;&quot; + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (e!=null) location=&quot;mailto:documentation@zend.com&quot; + &quot;?Subject= Feedback on PDT for page &quot; + escape(t) + &quot;&amp;Body=&quot; + escape(e).replace(/ /g, &quot;+&quot;) + crlf + &quot; &quot;; void 0"><span
style="background-color: #ffffff;">Submit Documentation</span><span
style="background-color: #ffffff;"> Feedback</span></a><span
style="background-color: #ffffff;"></span><span style="background-color: #ffffff;">
</span><span style="background-color: #ffffff;">|
</span><span
style="background-color: #ffffff;"><a title="View Latest Version and Get PDF Online"
href="http://www.zend.com/en/resources/zend-documentation/"
target="_blank">View Latest
Version and Get PDF Online</a></span></p>
</div>
<h1>Code Templates Preferences
</h1>
<p>The Code Templates Preferences page allows you to configure the code
and comments that are automatically created for different types of elements.</p>
<p>&#160;</p>
<p>The Code Templates Preferences page is accessed from <span style="font-weight: bold;"><b>Window
| Preferences | PHP | Code Style | Code Templates</b></span>.</p>
<p class="picture"><img src="code_templates_preferences.jpg" alt="code_templates_preferences.jpg" style="border: none;" width="628" height="544" border="0"></p>
<table cellspacing="0" width="100%">
<col style="width: 7.093%;">
<col style="width: 92.907%;">
<tr style="vertical-align: top;">
<td style="width: 7.093%; padding-right: 10px; padding-left: 10px;"><p
style="font-size: 6pt;">&#160;</p></td>
<td style="width: 92.907%; padding-right: 10px; padding-left: 10px;"><p
style="font-weight: bold;">&#160;</p></td>
</tr>
<tr style="vertical-align: top;">
<td style="width: 7.093%; padding-right: 10px; padding-left: 10px;"><p
style="font-size: 6pt;"><img src="ref_icon.png" alt="Instructions on how to complete a procedure" title="Instructions on how to complete a procedure" style="border: none;" width="28" height="33" border="0"></p></td>
<td style="width: 92.907%; padding-right: 10px; padding-left: 10px;"><p
style="font-weight: bold;">To edit the pattern for a comment
or code element:</p>
<ol type="1">
<li class="p" style="margin-left: -20px; font-weight: normal;"><p
style="font-weight: normal;">Expand the list and select
the required element.</p></li>
<li class="p" style="margin-left: -20px; font-weight: normal;"><p
style="font-weight: normal;">Click <span style="font-weight: bold;"><b>Edit</b></span>.<br>
The &quot;Edit Template&quot; dialog is displayed.</p></li>
<li class="p" style="margin-left: -20px; font-weight: normal;"><p
style="font-weight: normal;">Edit the pattern as required
and click <span style="font-weight: bold;"><b>OK</b></span>.</p></li>
<li class="p" style="margin-left: -20px; font-weight: normal;"><p
style="font-weight: normal;">If required, mark the 'Automatically
add comments for new methods and types' box for comments to
be automatically generated when new methods and types are
created.</p></li>
<li class="p" style="margin-left: -20px; font-weight: normal;"><p
style="font-weight: normal;">Click <span style="font-weight: bold;"><b>Apply</b></span>
to apply your changes.</p></li>
</ol></td>
</tr>
<tr style="vertical-align: top;">
<td colspan="2" style="width: 100%; padding-right: 10px; padding-left: 10px;"><p>&#160;</p></td>
</tr>
</table>
<h3>Exporting and Importing Code Templates</h3>
<p>PDT enables
you to export and import code templates, which are created within XML
files in the following format:</p>
<p class="code">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;
standalone=&quot;no&quot;?&gt;</p>
<p class="code">&lt;templates&gt;</p>
<p class="code">&lt;template</p>
<p class="code">autoinsert=&quot;true&quot; context=&quot;php&quot; deleted=&quot;false&quot;
description=&quot;description&quot; enabled=&quot;true&quot; id=&quot;org.eclipse.php.ui.editor.templates.php.codetemplates.xxxcomment&quot;
name=&quot;name&quot;&gt;</p>
<p class="code">/** * ${tags} */</p>
<p class="code">&lt;/template&gt;</p>
<p class="code">&lt;/templates&gt;</p>
<table cellspacing="0" width="100%">
<col style="width: 7.093%;">
<col style="width: 92.907%;">
<tr style="vertical-align: top;">
<td style="width: 7.093%; padding-right: 10px; padding-left: 10px;"><p
style="font-size: 6pt;">&#160;</p></td>
<td style="width: 92.907%; padding-right: 10px; padding-left: 10px;"><p
style="font-weight: bold;">&#160;</p></td>
</tr>
<tr style="vertical-align: top;">
<td style="width: 7.093%; padding-right: 10px; padding-left: 10px;"><p
style="font-size: 6pt;"><img src="ref_icon.png" alt="Instructions on how to complete a procedure" title="Instructions on how to complete a procedure" style="border: none;" width="28" height="33" border="0"></p></td>
<td style="width: 92.907%; padding-right: 10px; padding-left: 10px;"><p
style="font-weight: bold;">To import a code template:</p>
<ol type="1">
<li class="p" style="margin-left: -20px;"><p>Click Import to
open the &quot;Import Templates&quot; browser.</p></li>
<li class="p" style="margin-left: -20px;"><p>Select the relevant
XML file containing the template information.</p></li>
<li class="p" style="margin-left: -20px;"><p>Click <span style="font-weight: bold;"><b>Open</b></span>.</p></li>
</ol></td>
</tr>
<tr style="vertical-align: top;">
<td colspan="2" style="width: 100%; padding-right: 10px; padding-left: 10px;"><p>The
templates contained in the template.xml file will be imported
into the list of Templates.</p></td>
</tr>
</table>
<table cellspacing="0" width="100%">
<col style="width: 7.093%;">
<col style="width: 92.907%;">
<tr style="vertical-align: top;">
<td style="width: 7.093%; padding-right: 10px; padding-left: 10px;"><p
style="font-size: 6pt;">&#160;</p></td>
<td style="width: 92.907%; padding-right: 10px; padding-left: 10px;"><p
style="font-weight: bold;">&#160;</p></td>
</tr>
<tr style="vertical-align: top;">
<td style="width: 7.093%; padding-right: 10px; padding-left: 10px;"><p
style="font-size: 6pt;"><img src="ref_icon.png" alt="Instructions on how to complete a procedure" title="Instructions on how to complete a procedure" style="border: none;" width="28" height="33" border="0"></p></td>
<td style="width: 92.907%; padding-right: 10px; padding-left: 10px;"><p
style="font-weight: bold;">To export a code template:</p>
<ol type="1">
<li class="p" style="margin-left: -20px;"><p>Select the template(s)
for export from the Template list.</p></li>
<li class="p" style="margin-left: -20px;"><p>Click <span style="font-weight: bold;"><b>Export</b></span>
to open the &quot;Export Templates&quot; dialog.</p></li>
<li class="p" style="margin-left: -20px;"><p>Select the location
to save the XML file to.</p></li>
<li class="p" style="margin-left: -20px;"><p>Click <span style="font-weight: bold;"><b>Save</b></span>.</p></li>
</ol></td>
</tr>
<tr style="vertical-align: top;">
<td colspan="2" style="width: 100%; padding-right: 10px; padding-left: 10px;"><p>An
XML file will be created with the template information.</p></td>
</tr>
</table>
<table cellspacing="0" width="100%">
<col style="width: 7.093%;">
<col style="width: 92.907%;">
<tr style="vertical-align: top;">
<td style="width: 7.093%; padding-right: 10px; padding-left: 10px;"><p
style="font-size: 6pt;">&#160;</p></td>
<td style="width: 92.907%; padding-right: 10px; padding-left: 10px;"><p
style="font-weight: bold;">&#160;</p></td>
</tr>
<tr style="vertical-align: top;">
<td style="width: 7.093%; padding-right: 10px; padding-left: 10px;"><p
style="font-size: 6pt;"><img src="ref_icon.png" alt="Instructions on how to complete a procedure" title="Instructions on how to complete a procedure" style="border: none;" width="28" height="33" border="0"></p></td>
<td style="width: 92.907%; padding-right: 10px; padding-left: 10px;"><p
style="font-weight: bold;">To export all code templates:</p>
<ol type="1">
<li class="p" style="margin-left: -20px;"><p>Click <span style="font-weight: bold;"><b>Export
All</b></span>.</p></li>
<li class="p" style="margin-left: -20px;"><p>Select the location
to save the XML file to.</p></li>
<li class="p" style="margin-left: -20px;"><p>Click <span style="font-weight: bold;"><b>Save</b></span>.</p></li>
</ol></td>
</tr>
<tr style="vertical-align: top;">
<td colspan="2" style="width: 100%; padding-right: 10px; padding-left: 10px;"><p>An
XML file will be created with the template information.</p></td>
</tr>
</table>
<p class="Note">Note:</p>
<p class="NoteText">If you selected more than one template to export, all
of them will be present in the exported XML file. Each of the original
Templates is bounded by: &lt; template &gt; &lt;/template&gt;</p>
<table cellspacing="0" width="100%">
<col style="width: 7.093%;">
<col style="width: 92.907%;">
<tr style="vertical-align: top;
height: 16px;">
<td style="width: 7.093%; padding-right: 10px;
padding-left: 10px;"><p
style="font-size: 6pt;">&#160;</p></td>
<td style="width: 92.907%;
padding-right: 10px; padding-left: 10px;"><p>&#160;</p></td>
</tr>
<tr style="vertical-align: top;
height: 35px;">
<td style="width: 7.093%; padding-right: 10px;
padding-left: 10px;"><p
style="font-size: 6pt;"><img src="link_icon.png" alt="link_icon.png" style="border: none;" width="32" height="40" border="0"> </p></td>
<td style="width: 92.907%;
padding-right: 10px; padding-left: 10px;"><p
style="font-weight: bold;">Related Links:</p>
<p style="font-weight: normal;"><a href="templates.htm" style="font-weight: normal;">Templates
Preferences</a></p>
<p style="font-weight: normal;"><a href="preferences.htm">PHP Preferences</a></p>
<p style="font-weight: normal;"><a href="phpdoc_comments.htm">phpDoc
Block Comments</a></p></td>
</tr>
<tr style="vertical-align: top;
height: 19px;">
<td style="width: 7.093%; padding-right: 10px;
padding-left: 10px;"><p
style="font-size: 6pt;">&#160;</p></td>
<td style="width: 92.907%;
padding-right: 10px; padding-left: 10px;"><p>&#160;</p></td>
</tr>
</table>
<div style="width: 100%; position: relative;" id="footer">
<p style="text-decoration: underline; "
align="center">PHP Development
Tools</p>
</div>
<script type="text/javascript" language="javascript1.2">//<![CDATA[
<!--
if (window.writeIntopicBar)
writeIntopicBar(0);
highlightSearch();
//-->
//]]></script>
</body>
</html>