Using macros in templates
You can also use macros in your templates to have various strings automatically generated when you create objects from template. Macros are called in templates in the form
__
MacroName__
(with two underscores before and two underscores after the macro name).The following macros are provided by the IDE and are available for use in templates but can not be modified:
- __NAME__ - name of the class.
- __PACKAGE__ - name of the package that the class is in.
- __PACKAGE_SLASHES__ - name of the class's package, but delimited with slashes (
/
) instead of periods (.
).- __QUOTES__ - inserts a double quote mark (
"
). This macro is necessary if you want to place a macro between quote marks. If you enter directly quotes, text substitution for any macros occurring with the quotes will not be performed when an object is created from the template.
Contents | Prev | Next | Index |