Use code templates to include frequently used blocks of
code in a program.
Procedure
- Click the location where you want the code block. If you
know the first few letters of the code block, you can type them.
- Press Ctrl+Spacebar.
The
content assist window opens with language element suggestions.
- Press Ctrl+Spacebar again.
Tip: You can toggle the content assist window between the default
pane and template pane by pressing Ctrl+Spacebar repeatedly.
If you close the content assist window and open it again without changing
the cursor location, it reopens on the same pane.
- To see a preview of the template, click the template name.
A text box opens showing the content of the template
- Double-click a template name to include it in the source
file.