Code Generation – T4 Editors
In checking out the T4 code generator that is built right into Visual Studio 2008 but which has no code coloring or IntelliSense, I came across two free add-ins that provide some features you can use.
- T4 Editor Community Edition adds some limited code coloring for the T4 keywords and directives.
- Tangible modeling tools plus T4 Editor adds code coloring for T4 keywords and for embedded C#, SQL, VB and other languages AND it provides IntelliSense for some basic classes of the .NET Framework.
Both these products provide full code-coloring and full IntelliSense in their Pro versions. Of the two free versions I recommend the Tangible T4 Editor because it code-coloring everything and the basic IntelliSense is very useful. I haven’t yet tried the modeling tools that come with it, but they look good too.
If you want to find out more about T4 and how you can use it to generate code, here are a few links:
- T4 (Text Template Transformation Toolkit) Code Generation – Best Kept Visual Studio Secret
- T4 Toolbox – Includes ready-made code generation templates and links to excellent tutorials and articles on using T4
- MSDN:Generating Artifacts By Using Text Templates