Creating an editor template

To create your own editor template:
  1. From the main menu, select Window > Preferences.
  2. In the left pane, select C/C++ > Editor > Templates.
  3. Click New.
    A dialog for adding new templates is displayed.
  4. In the Name field, type a name for this editor template.
  5. In the Pattern field, type the code used to form the template.
    To insert a variable into the template code, click Insert Variables and then double-click an entry in the popup window.
  6. Click OK when finished.