Editing Text Template (T4) files: the Visual Studio/Notepad vs. SFT experience

If you have ever worked with GAX/GAT and/or the DSL Tools chances are that you had to look at existing templates and maybe customize them or create your own. Currently none of these two technologies offers you any remedies for the pain that is browsing and editing these templates with a “plain-text” experience.

So, let’s say you want to understand the serialization code in order to being able to introduce a few customizations of your own here and there. Try editing C:\Program Files\Visual Studio 2005 SDK\2006.09\VisualStudioIntegration\Tools\DSLTools\TextTemplates\Dsl\DomainClassSerializer.tt with Visual Studio (or notepad for that matter, as you’re not going to tell the difference in this case), it’s “only” 3751 lines of NO syntax coloring, NO code completion, NO quick navigation, NO nothing.

Let’s take another large file, Diagram.tt (living in the same folder as the file pointed out above). What changes in this case? It’s “only” 2469 lines in length, much shorter than the previous file, and we still get the NO nothing.

Ok, these are large files, not every text template file will be that large, granted. But can you still live with the “NO nothing” experience even for smaller files? I don’t think so, I know I can’t.

This is the reason why we have introduced a Text Template editor into SFT, for helping you today with your daily tasks in developing Software Factory projects.

Here is a single screenshot that should tease you enough to go download the bits:

 

 
You can also take a look at the T4 Editor’s Quick Users Guide (lots of screenshots in there) and if you want to learn more about this feature you can check Jose’s blog who works on the SFT team.

 

No Comments