blob: 2b7746541a0959b17b1902eb382361cbf90aaca4 [file]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>
Templates
</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
</head>
<body>
<h1>
Templates
</h1>
<p>
The
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.JavaTemplatePreferencePage)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Templates preference page">
<b>Java &gt; Editor &gt; Templates</b></a> preference page
allows to create new and edit existing templates. A template is a convenience for the programmer to quickly insert often reoccurring source
code patterns.
</p>
<p>
The following buttons allow manipulation and configuration of templates:
</p>
<table border="1" cellspacing="0" cellpadding="5" width="100%">
<thead>
<tr>
<th>
<p>
Action
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
<p>
New...
</p>
</td>
<td valign="top">
<p>
Opens the <a href="ref-preferences-edit-template-dialog.htm">Template dialog</a> to create a new template.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Edit...
</p>
</td>
<td valign="top">
<p>
Opens the <a href="ref-preferences-edit-template-dialog.htm">Template dialog</a> to edit the currently selected template.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Remove
</p>
</td>
<td valign="top">
<p>
Removes all selected templates.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Restore Removed
</p>
</td>
<td valign="top">
<p>
Restores any preconfigured templates that have been removed.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Revert to Default
</p>
</td>
<td valign="top">
<p>
Restores any preconfigured templates to their default. This does not modify user-created templates.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Import...
</p>
</td>
<td valign="top">
<p>
Imports templates from the file system.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Export...
</p>
</td>
<td valign="top">
<p>
Exports all selected templates to the file system.
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Use code formatter
</p>
</td>
<td valign="top">
<p>
If enabled, the template is formatted according to the code formatting rules specified in the <a href="ref-17.htm">Code Formatter preferences</a>, prior to insertion.
Otherwise, the template is inserted as is, but correctly indented.
</p>
</td>
</tr>
</tbody>
</table>
<p>
<img src="../images/ngrelc.png" alt="Related concepts" border="0" ></p>
<p>
<a href="../concepts/ctemplates.htm">Templates</a><br>
</p>
<p>
<img border="0" src="../images/ngrelr.png" alt="Related reference"></p>
<p>
<a href="../reference/ref-preferences-template-variables.htm">Template variables</a><br>
<a href="../reference/ref-preferences-edit-template-dialog.htm">Template editing</a><br>
<a href="../reference/ref-143.htm">Java content assist</a><br>
<a href="../reference/ref-preferences-task-tags.htm">Task tag preferences</a><br>
<a href="../reference/ref-preferences-code-templates.htm">Code templates preferences</a><br>
<a href="../reference/ref-preferences-code-generation.htm">Code style preferences</a>
</p>
</body>
</html>