Castalia's code templates increase a developer's speed and accuracy by allowing her to produce common and complex programming structures with just a few keystrokes.
Errors are often introduced into code by malformed control structures. By consistently utilizing code structures that are known to be correct, the chances of introducing these errors is greatly reduced.
Many "known good" control structures are lengthy and may be obscure enough that a developer will have to refer to documentation to produce them. Code templates reduce even the lengthiest structures to just a few keystrokes which are easily remembered, and in some cases (such as a "case" statement) don't even require the developer to remember a template name; Castalia simply anticipates what the developer intends to do and completes the code.
Castalia's code templates do not replace Delphi's built-in templates, but are a separate mechanism. Below is a comparison of Delphi's templates to Castalia's:
| Delphi Templates | Castalia Templates | |
| Code entry points | Limited to one | Unlimited code entry points |
| Code formatting | No code formatting | Each template can be customized to match your programming style |
| Template Activation | Requires you to press (and remember) a hotkey (Ctrl+J by default) | Automatically activate on ANY key you designate (spacebar by default). You can choose a hotkey if you wish |
| Clipboard integration | No clipboard Integration | Use the clipboard contents in your templates |
| Context awareness | No context awareness | Each template can be customized only to activate in certain contexts and in certain parts of a unit |
Code templates are available in the Delphi, C#, and C++ languages.
Editor Splitter