The CodeSmith Team has been hard at work on the new Visual Studio Template Editor and existing Visual Studio Integration story. We first announced our new Template Editor in the previous post and will be covering new features and enhancements on a weekly basis until the release in the near future. We believe as a company that when you feel comfortable in your development environment, then that is when you are the most productive. The learning curve behind learning a new editor can be daunting and we want to remove that from the CodeSmith Generator experience. The topics below will display what we are doing to deliver you the best code generation experience to date! Please leave us your feedback on your current thoughts as we are getting very close to a public beta! Please keep in mind this is not the final product that will be delivered and is subject to change and/or requires some finishing touches.
Configuration and Customization Improvements
In a previous post, I covered many of these changes to improve usability in CodeSmith Generator. One of the topics we all can agree on is that most if not a very large portion of developers are not User Interface (UI) Designers. I will be the first to say that we do not make any claim to be User Interface designers; we do however spend a lot of time making improvements to our User Interfaces based on feedback from end users. With this said, we wanted to integrate deeply within Visual Studio and take advantage of the work Microsoft and it’s designers have done with configuring options.
All of the CodeSmith Generator’s Template Highlighting styles are read from your existing Visual Studio Configuration settings and specific Template Highlighting styles can be configured inside of Visual Studio’s Options as shown above.
The screenshot above shows what the editor looks like when applying a downloaded Visual Studio Color theme and applying it to the Visual Studio Instance.
Rich Template Syntax Highlighting and Template output
Our new WPF Template Editor offers a rich editing experience that covers a broad spectrum from Intellisense to Highlighting. We support Template Syntax Highlighting for many different language types like html, Xml, SQL.
In the previous editor you would have received Syntax Highlighting for document types like html. The main difference in the new editor is that we have updated definitions and color highlighting based on your preferences for different content types. We also expanded our supported list of document types that the editor can render.
The biggest change you will notice in this version is that instead of showing the html source in our editor; we now generate the document and have Visual Studio show the document using the documents editor. This allows you to see the documents design view right after you generate!
Add New Item Improvements
The Visual Studio Add New Item dialog now contains context aware Item Templates that will add a new Template, Map or Project to your project. If you are in a CSharp Project and want to add a template to your project the Add New Item dialog will present you with the option of adding a new CSharp template. We believe that if you are in a CSharp project that you would want a CSharp Template and not a new Visual Basic or JScript Template. If you are adding a new item to the solution then you will be presented with the option to add any kind of template.
We want to add additional templates to this dialog like add a new master and sub template or a TableSchema template which is preconfigured for you.
Filtering the PropertyGrid
No longer will you have to search line by line in the property grid to find the property you are looking for. The new PropertyGrid offers many improvements over the old PropertyGrid like the ability to filter by required properties, by property name and so much more!
In the screenshot above, we are filtering the templates properties to show only the properties that contain the search string specified in the PropertyGrid toolbar.
We’ve added rich WPF PropertyGrid validation that lets you know when a required property isn’t populated or the property value isn’t a valid value.
This feature will save you time and let you know ahead of time that you need to fill in a required property before you generate!