blob: 55e78aaea81004f91b3eee8e011efec574055d18 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<title>Editor Options: Code Templates</title>
<link rel="stylesheet" href="ide.css" title="Oracle BLAFDoc" type="text/css"/>
</head>
<body>
<p><a id="netbeans.optionsDialog.editor.codeTemplates" name="netbeans.optionsDialog.editor.codeTemplates"></a></p>
<div id="NBCSH220"><!-- infolevel="all" infotype="General" --><a id="sthref8" name="sthref8"></a>
<h1>Editor Options: Code Templates</h1>
<a name="BEGIN" id="BEGIN"></a>
<p>Use this tab to add, delete, or modify code templates. Code Templates are abbreviations that you type into the code and that the editor expands into code blocks. The templates include placeholder values. After you expand a code template, you go through the expanded block and replace the placeholder values.
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG2205">
<param name="text" value="<html><u>More</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>
<p>You can modify the following elements:</p>
<table summary="User interface elements and descriptions" dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<col width="24%" />
<col width="*" />
<thead>
<tr align="left" valign="top">
<th align="left" valign="bottom" id="r1c1-t14">Element</th>
<th align="left" valign="bottom" id="r1c2-t14">Description</th>
</tr>
</thead>
<tbody>
<tr align="left" valign="top">
<td align="left" id="r2c1-t14" headers="r1c1-t14">
<p>Language</p>
</td>
<td align="left" headers="r2c1-t14 r1c2-t14">Select a language from the drop-down list to see the code templates available for that language.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r3c1-t14" headers="r1c1-t14">
<p>Templates</p>
</td>
<td align="left" headers="r3c1-t14 r1c2-t14">The table displays the current code templates for the selected language. The fields in the table are read-only.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r4c1-t14" headers="r1c1-t14">
<p>&nbsp;&nbsp;&nbsp;&nbsp;Abbreviation</p>
</td>
<td align="left" headers="r4c1-t14 r1c2-t14">The abbreviation for the expanded code.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5c1-t14" headers="r1c1-t14">
<p>&nbsp;&nbsp;&nbsp;&nbsp;Expanded Text</p>
</td>
<td align="left" headers="r5c1-t14 r1c2-t14">The code that the editor will generate when you type the abbreviation.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r6c1-t14" headers="r1c1-t14">
<p>&nbsp;&nbsp;&nbsp;&nbsp;Description</p>
</td>
<td align="left" headers="r6c1-t14 r1c2-t14">A description of the template. (Optional)</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r7c1-t14" headers="r1c1-t14">
<p>Expanded Text</p>
</td>
<td align="left" headers="r7c1-t14 r1c2-t14">This tab contains the expanded code. You can type in this text area to modifyan existing code template or when you create a new code template.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r8c1-t14" headers="r1c1-t14">
<p>Description</p>
</td>
<td align="left" headers="r8c1-t14 r1c2-t14">This tab contains a description of the code template. You can type in this text area to modify or create a description for a code template.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r9c1-t14" headers="r1c1-t14">
<p>Expand Template On</p>
</td>
<td align="left" headers="r9c1-t14 r1c2-t14">Select the key or key combination that is used to expand code template abbreviations. By default, press Tab to expand an abbreviation. You can change this to Shift, Shift-Space, or Enter.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r10c1-t14" headers="r1c1-t14">
<p>On Template Expansion</p>
</td>
<td align="left" headers="r10c1-t14 r1c2-t14">Select the formatting task that the IDE performs when you expand a code template abbreviation. By default, the IDE reformats the code. The IDE instead can only reindent the code or do no formatting.</td>
</tr>
</tbody>
</table>
<br />
<!-- -->
<a id="NBCSH230" name="NBCSH230"></a>
<hr><p><b>Related Topics</b></p>
<p><i>Developing Applications with NetBeans IDE</i>,
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG117">
<param name="text" value="<html><u>&quot;Working with the Options Window&quot;</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>
<p><i>Developing Applications with NetBeans IDE</i>,
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG506">
<param name="text" value="<html><u>&quot;Using Special Code Templates&quot;</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>
<!-- -->
<!-- Start Footer -->
<table summary="" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="left" width="86%"><a href="legal_notice.htm">
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0.</a>
</td>
</tr>
</table>
<!-- -->
</body>
</html>