Live Templates Changes for XE

From RAD Studio XE
Jump to: navigation, search

Go Up to What's New in Delphi and C++Builder XE


The following new live templates have been added to the Template Manager (View > Templates).


New Live Templates

Keystrokes    Invocation Type   Description

ifnil

Auto

Inserts the if...then clause that checks whether a given variable is nil, and then the code to create it if true.

ifnass

Auto

Inserts the if...then clause to check whether a variable is not Assigned, and if not, creates an instance of it and assigns it to the variable.

para

Manual/ Surround

Adds an XMLDoc paragraph tag (<para>) at the current location, including open and close tags. It can also be used to surround existing text.

param

Auto

Adds an XMLDoc param tag (<param> at the current location, including open and close tags, and the Name attribute.

point

Manual

Adds a <point> tag to Live Template XML files, including fields for the point name, description, and hint.

prop

Manual

Creates a basic property declaration with a user-defined getter and setter. Incorporates easy inclusion of the data type.

propf

Auto

Declares a property with fields as the getter and setter. Automatically fills the field names and declares the field variable as private.

propgs

Auto

Declares a property with a getter and a setter with the same name as the property. Also invokes code completion when done.

propro

Auto

Declares a read-only property with a user-definable getter. Automatically invokes class completion to declare the getter.

proprof

Auto

Declares a read-only field with a simple field. Invokes class completion to declare the field.

remarks

Manual

Adds an XMLDoc remarks tag (<remarks >) at the current location, including open and close tags.

returns

Manual

Adds an XMLDoc returns tag (<returns>) at the current location, including open and close tags.

summary

Manual

Adds an XMLDoc summary tag (<summary>) at the current location, including open and close tags.

todo

Auto

Creates a {TODO} item at the current location, including parameters for Owner, Type, and General Description.

Note: Items that are set to be auto-invoked usually have names that users would not usually type (for example, a combination of abbreviations).

See Also