Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 23912, Simple Live Template Generator for BDS

by Nick Hodges Email: Anonymous

A Live Template Generator and accompanying code and utilities.
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 10.0  to 10.0 589 downloads
Copyright: No significant restrictions

Size: 95,969 bytes
Updated on Thu, 26 Jan 2006 22:35:25 GMT
Originally uploaded on Sat, 21 Jan 2006 15:17:52 GMT
SHA1 Hash: C6A9669D3612E9AB58EB4E31F9DDC7E0A8E3CFB5
MD5 Hash: 1620F895AA7ADDA8855C28D298F17799

    Explore the files in this upload

Thanks for downloading the Live Template Generator Pack. The Live Template Generator Pack is a collection of classes and projects that assist in easily creating Live Templates for Borland Developer Studio.


To install, simply unzip the files to a directory of your choosing.
Open the TemplateGeneratorExpert.bdsproj in BDS, and then compile and install the package.
Once that is done, you'll have a new entry on the Tools menu called "Template Generator Form" that will bring up the Template Generator Expert.


Once the expert is started, it's pretty self-explanatory and easy to figure out. Nothing fancy here. It's designed, really, for one word replacements. It started as a project to help VB6 developers develop a set of templates for translating from VB to Delphi (for instance, for turning MsgBox into MessageDlg, etc.)

Also included is a command line application, TemplateGenerator.exe, that takes a text file of name=value pairs and creates templates based on those entries. If you have a collection of items that need translating, then you can easily create a large collection of templates. I use it to create templates to fix my common typos, such as changing 'stirng' to 'string'.

In addition, I included the DUnit test coding for TTemplateGenerator class.


I've included the documentation generated by Together for Delphi. It's pretty sparse at the present time. I've found the Docuemtation feature of Together for Delhpi to be a bit unreliable and hard to deal with, but I'll keep at it. The potential is there, for sure. I'm hoping things will improve.


At the heart of the project is uTemplateGenerator, a class that creates the template, taking the various pieces of information and processing it into an XML file. By default, the file is then placed in the logged in user's code_templates directory. For instance, mine is

C:\Documents and Settings\Nick\Local Settings\Application Data\Borland\BDS\4.0\code_templates

However, you can put the files anywhere you like by setting the OutputDirectory property. You need only set the StringToReplace and ReplaceWithString


Rudy Velthuis gave the starter code for the Expert itself. Kudos and thanks go to Rudy. If you adapt or use this code in any way, please credit Rudy and me.


Any questions, comments, improvements, etc., can be sent to me at


1.0 -- January 21, 2006 -- Initial release designed only to create basic word replacement templates.

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03