The Code Templates Preferences page allows you to configure the code and comments that are automatically created for different types of elements.
The Code Templates Preferences page is accessed from Window | Preferences | PHP | Code Style | Code Templates.
|
|
To edit the pattern for a comment or code element:
|
|
|
PDT enables you to export and import code templates, which are created within XML files in the following format:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<templates>
<template
autoinsert="true" context="php" deleted="false" description="description" enabled="true" id="org.eclipse.php.ui.editor.templates.php.codetemplates.xxxcomment" name="name">
/** * ${tags} */
</template>
</templates>
|
|
To import a code template:
|
|
The templates contained in the template.xml file will be imported into the list of Templates. |
|
|
To export a code template:
|
|
An XML file will be created with the template information. |
|
|
To export all code templates:
|
|
An XML file will be created with the template information. |
Note:
If you selected more than one template to export, all of them will be present in the exported XML file. Each of the original Templates is bounded by: < template > </template>
|
|
|
Related Links: |
|
|