Create a custom template

To create your own 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 code template.
  5. In the Pattern field, type the code used to form the template. Click Insert Variables to insert variables into the template code.
  6. Click OK when finished.

The IDE lets you enable as many of these templates as you require, edit them as you see fit, create your own templates, and so on.