I am trying to figure out how to make an editor extension (like T4 templates) or designer extension (like a WinForms designer) that produces a generated file and a "code-behind" file.
For the T4-style code generator I know that a single-file generator is an option but it is very limited (e.g. only a single output file is allowed) and I am not sure how to combine that development path (which seems incompatible with vsix deployment) with an extension that supports other features such as syntax highlighting or editor context menus.
So I would like to find a vsix-compatible approach. I would like to write an extension that works like this
- Offer a new *.xyz file extension in the New file dialog
- Upon creating the new *.xyz file, a text editor or custom editor (personally I want to use a text editor) appears to edit the file.
- When the *.xyz file is edited, one or more *.cs (or let's say *.vb files in a VB project) pop out as children of the *.xyz file in solution explorer and become part of the project. (I am also curious about how you can make one of the files non-generated, like the user-editable code-behind file that comes with a *.xaml file, but for my own purposes I only need to produce generated file(s).)
I know how to do #2 (syntax highlighting, and I saw something on MSDN about custom editors). #1 is a lower priority but I'm haven't quite figured it out yet; e.g. there are instructions on MSDN but no mention of how you would integrate an item template into a VSIX project.
The most important thing I want to know is #3. Does this feature even have a name I could google for?