Code Templates Preferences
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.
Code Templates Preferences page
Editing the Pattern for a Comment or Code Element
|
|
|
To edit the pattern for a comment or code element:
|
|
Exporting and Importing Code Templates
Zend Studio 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>
Importing a Code Template
|
|
|
To import a code template:
|
The templates contained in the template.xml file will be imported into the list of Templates. |
Exporting a Code Template
|
|
|
To export a code template:
|
An XML file will be created with the template information. |
Exporting All Code Templates
|
|
|
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>