DevExtra 8.0
DevExtra is a free set of productivity tools for developers using Microsoft Visual Studio 2005.

Designed primarily for C++ developers, DevExtra includes many useful features all packaged conveniently as a single Visual Studio Addin.
Download
Here's the downloads of both the addin and standalone versions of DevExtra. Be sure to read release notes below for important information about these downloads.
Important: If you're installing this over an existing installation and you've modified any of the standard code generator templates, back them up before installing. This installer replaces all templates with the latest versions and doesn't care if you've changed them.
Download Alpha Version: DevExtra80Setup.exe
Download Stand Alone Code Generator: DevExtraCodeGen80Setup.exe
Code Generator
DevExtra includes a powerful script enabled, ASP style code generator, allowing your to easily develop code generation templates.

- Generate anything from simple code snippets to complete files and projects.
- Uses simple VBScript or JScript scripting language.
- Write templates that not only generate new code and files but also edit existing files.
- Powerful search capability available so template script can locate correct place to insert generated code.
- Includes QuickPrompts for building user-interface forms for entering code generation parameters.
- Tightly integrated with Visual Studio IDE - place cursor at precise location after code generation, examine the file currently being edited etc...
- Comprehensive help and programmer's reference.
- Includes many useful templates.
- Doesn't apply any changes until entire code template finishes execution - prevents partially applying changes if script errors occur.
- Preview button allows code be generated but not applied - great for testing/debugging code templates.
- Also available as stand-alone program. (see download links above).
If you're looking for the VST Plugin Code Generator, it's included as a template in both the stand-alone and the add-in versions of DevExtra. There's also additional information here - VST Code Generator and an updated template for MinGW/MSYS here - VSTCodeGen.zip.
Method Generator
DevExtra's method generator converts method declarations in IDL or C++ and instantly generates implementation stubs.

- Generate C++ header + implementation stubs directly from IDL.
- Generate C++ implementation stubs from C++ function prototypes.
- Convert C++ function implementations into declaration prototypes.
- Instantly processes an entire interfaces, a group of functions or a single function.
- Automatically parses and extracts interface declarations from project's IDL files.
- Convert parsed interfaces, selected text or text on clipboard.
- Over 120 built-in predefined COM interfaces.
- Automatically determines implementation class name from current cursor location.
- Customizeable script based conversion templates.
C++ Code Reformatter
A simple code C++ reformatter:

- Great for "messed up code"
- Improve code consistency across a single or multiple projects.
- Very simple, with just a few options.
Although under the covers, the code reformatter has a powerful rule based system for reformatting. For the moment I've decided to only expose the simple version. I may at some point setup a system to allow more control over code reformatting rules.
Project Statistics
Simple project statistics reporting:
- Total file count for each project in a solution.
- Total line count
- Blank line count
- Comment line count
- All line counts also reported as percentage of project total.
Smart Case Replace
Smart case replace performs search and replace operations, maintaining the case of the matched text.
- Search active document, all open documents, entire project or entire solution.
- Whole word match.
- Can keep all modified files open for review and/or undo before saving.
- Great for renaming entire projects, classes etc...
Toggle Source to Header
The simplest but arguably the most useful of all of DevExtra's commands - simply toggles the current document between .cpp implementation file and .h header file of the same name. A huge time saver. Be sure to bind a keystroke to this one.
Custom Environment Variables [New]
While Visual Studio provides a user interface for editing standard environment variables such as Path, Include and Lib, there is no facility for creating custom environment variables. Because environment variables are available in project settings as $(Variables), being able to set custom variables can be extremely useful.
Normally to set such a variable requires shutting down Visual Studio, defining or editing the variable at the operating system level and re-starting Visual Studio.
DevExtra however includes a simple user-interface for defining these variables:

Notes:
- Once defined, these variables can be use within project settings just like any other variable. eg: $(SetupDir).
- Each variable has a check mark. If you define multiple values for one variable, only one can be selected at a time making it easy to switch between different settings.
- To access Environment Variable settings, use DevExtra's Options command (the second last toolbar button).
- You shouldn't use this dialog for setting standard environment variable such as Include and Lib. These variables should always be edited through Visual Studio's Tools | Options settings.
Full List of DevExtra's Commands
- Explore Project - launches Windows Explorer in the directory of the current project.
- Open Project File - display a dialog with all files in the entire solution in alphabetical order.
- Open Project .idl File - open the current project's idl file.
- Project Statistics - displays line and file counts for the entire solution.
- Toggle Source to Header - toggles between C++ source and header files of the same name.
- Generate Code - powerful ASP style scripted code generator
- Generate Methods - convert C++ and IDL method declarations to C++ implementation stubs.
- Code Clean - simple code reformatting.
- Insert Cast - wrap the selected expression in C++ static_cast, reinterpret_case, dynamic_cast or const_cast operator.
- Insert GUID - allocates a new GUID and inserts it into the current text file.
- Align Columns - reformat text aligning into vertical columns.
- Sort - Sort selected lines alphabetically or numerically
- Renumber - Reassign numbers in increasing order. (great for reorganising resource.h)
- Smart Case Replace - search and replace, maintaining case of found text.
- Debug Targets - configure a set of commonly used debug targets and quickly switch between them.
- Custom Environment Variables - define custom environment variables for use in projects.
Frequently Asked Questions
Well nobody's actually asked anything as I've only released this today, but here's some stuff you might be wondering:
- Does DevExtra work in Visual C++ Express?
- No. This version of Visual Studio doesn't support addins. You might find the stand-alone code generator useful though if that's what you're after.
- Why version 8.0?
- Simply to keep in sync with the Visual Studio version number.
- Can I write my own code generator templates?
- Yes. That's the whole idea of it.
- Where can I get more code templates?
- No where. But if anyone would like to send templates in I'll more than happily put them up here somewhere, or consider including them in future builds.
- Where's the help?
- Click the help button on the add-in's toolbar or the help button in the main dialog of the standalone code generator.
- Can code templates access Visual Studio's automation model?
- Yes there's a Host property that returns Visual Studio's DTE object.
- Why does the add-in toolbar appear docked to the left?
- Don't know - that's just what Visual Studio does.
- How to I bind keystrokes to commands? (like toggle source to header)
- From Visual Studio's Tools menu, select Customize. Click the Keyboard button. In the text box labelled "Show Commands Containing" enter DevExtra. You should be able to figure it out from there...
- Is it possible to debug code templates?
- Not really. Well not in a debugger anyway. Even if you could you probably wouldn't recognise most of the script as I've not written to code to act as a full ActiveScript smart host (actually I have but for another project). It didn't seem worth it for this project so I left it. MsgBox is your friend for resolving template bugs.
- How do I set the folder where code templates are loaded from?
- In the Generate Code dialog, click the options button. Enter one or more folders (one per line).
- What's with the Options button on the addin's toolbar?
- Adding or removing toolbar buttons in an addin is a bit of pain. Because I can foresee wanting to have some global options for the addin, I put the button in but as yet there are not options.
Release Notes
Notes about this release:
- This product is a port from the previous version of DevExtra 4.0 for DevStudio 6.0. In the process I re-wrote a fair bit of it - and it's only been tested as much as I've used it while developing it. In other words it works but there is almost certainly bugs in there.
- Most of the templates included for the code generator are very C++/ATL/COM related and some could probably use an update.
- Most of the help has been revisited/updated from the previous version but I may have missed some things - if you find errors/omissions, let me know.
- Although theoretically most of the features should work with all Visual Studio languages, not all make sense and I've only tested it for use in C++ development. If it works with C#/VB then good, if not let me know and I'll investigate as time allows.
- If you find a fault/problem or have ideas for other features/code templates etc... please don't hesistate to contact me.
- Don't forget to check back regularly for updates.
- Enjoy!
Version History
Version history, newest version listed first
9 July, 2007 - Build 103s
- Toggle Source to Header command now understands .xaml .xaml.cs and .xaml.vb file extensions and can be used to toggle between xaml file and its code behind file.
- A number of code generator templates for generating various xaml code fragments (probably more to come)
- Code generator template to generate a WPF dependency property
- Code generator templates for generating XML documentation comments in C# and C++ format (mainly useful for C++ where the editor doesn't insert the summary/param tags automatically)
- Changed Open Project IDL command to open the IDL file for just the selected project, not all projects.
14 March, 2007 - Build 102
- Fix to use project selected in solution explorer (when it has focus) rather than startup project as the active project for the code generator.
- Added new property to code generator ProjectResourceHeaderFile to return the correct name of "resource.h" (and updated templates to match).
- Fix to not use project .rc and .idl files that are marked Exclude from Build in code generator.
- Fix to maintain sort order in debug targets dialog.
- Fix for crash in create project dialog when path empty.
- Added About box to addin. (from the options button)
11 March, 2007 - Build 101
- Initial Alpha Version
Previous Version
The previous version of DevExtra for Visual Studio 6.0 is no longer supported, but still available for download:
