After I uploaded the T4 Editor I had very good feedback but people that was working with GAT (Guidance Automation Toolkit) had not coloring for .t4 extensions. Add .t4 extension to the list was the easier part in order to support .t4 templates.
When you install GAT from here it installs a special host for .t4 templates and a new cool processor "property processor" that define template properties to pass parameters to the template. For example this template receive a property called Number.
<#@ property processor="PropertyProcessor" name="Number" type="System.Int32" #>
Based on this I did the following things:
- Coloring property as built-in directive (see screenshots)
- Intellitips for properties (see screenshots)
- You can set the value for properties using the visual studio property grid
- You can right click and run the template. It will use the GAT Host if the extension is .t4 and pass the properties.
- If you need Debug, just set the breakpoint (generally F9) and start debug (F5) !!
- You can set conditionally breakpoints ;)
The debugger will open the generator source instead of the .t4 file, I could be great if we can tell to the engine what is the name of the file to debug.
Believe me or not I did a Setup this time !!
- Visual Studio 2005
- If you want to use the .t4 extension and run templates so install GAT
You don't need to install Visual Studio SDK if you want to work only with .t4 templates.