Page 1 of 1

Expanded Templating Functions

Posted: Sat Apr 02, 2011 6:19 pm
by Zach
I hope I gave the topic an appropriate name, but here are some things I would like to see..
(Or if they are possible can someone tell me how?)

A lot of this comes from my experience with Desktop Publishing Templates, as well as Visio.. But I think we would all find good uses for these features:

Templates that allows variable substitution & update source files to reflect Template Changes.
For example, I have a default header made up that I will apply to all my documents. They state the Project Name, File Name, Creation Date (MM/DD/YYYY), Author, License & Status (related to its license.. i.e Most of my files License' are "Not Permitted Without Permission" & Status is "Closed Source"). Below that I have a paragraph outlining basic stuff (don't use this without my permission etc etc) and a sub line which states which version of PB the code was Authored / Compiled for. A lot of this is done with placeholder text that I then have to go through and replace with the appropriate information.

Variable substitution would be awesome. We could define our own variable names, then we could assign values. Some could be pre-defined that query the IDE for information..
So then we can make templates for various stuff we need to insert, be it a header, or a generic procedure or whatever other people use them for. My main concern is Source Attribution in this case. Being able to use variables in this manner makes it easier to do things like storing the Creation and/or Last Edit Date/Time or any other relevant information you can come up with. I know SCM utilities can take care of some of this, but I still think it would be useful.

But most importantly having changes to a Template updated in the source files they are actually applied too, would be a great feature as well. I'm kind of surprised it isn't at least present as an option you can switch on/off (there are certain cases where you wouldn't want to overwrite something generic that you modified into something more specific). As it is now it really sucks to notice a typo or adding/subtracting information from your Template and then having to manually go back and re-insert it to every file.

Maybe I'm just dense and we can already do a lot of this... But if I'm not it would be great to see it :)