AutoCode 4.0 Released
I’m excited to announce the release of AutoCode 4.0 for Visual Studio 2010 and 2008.
For those new to AutoCode, just say that AutoCode is an Add-in for Visual Studio that will help developers coding, refactoring and executing repetitive tasks making them more productive.
To summarize, these are some of the main features that makes AutoCode a must-have tool for Visual Studio:
- Inline code generation
- Custom defined macros in C# or VB.NET
- IDE command execution
Plus the new features in AutoCode 4.0:
- Intellisense support for available commands
- Code behind and partial classes support for custom templates
- New fancy commands
- Commands allow now external assembly references
Inline code generation
More powerful than Visual Studio code snippets, AutoCode can generate pieces of code based in parameterized templates using ASPX and T4 syntax. For example, a property can be generated given the type and name; a full class can also be generated specifying the type and name pairs; selected code can be placed inside an if/else block, etc.
Developers can create their own templates to generate more sophisticated code just invoking the shortcut assigned to the template and passing the defined parameters.
Custom defined macros
AutoCode is based in commands similar to those macros supported by Visual Studio with the advantage that can be written in C# or VB.NET.
Pressing Ctrl+Enter the AutoCode dialog opens with an input text to enter the name and parameters of the command to invoke. The command, written in C# or VB.NET, can make use of the Visual Studio API to execute any imaginable task. For example, open the folder of the current file, format the current document, generate a full class base in a template, etc.
IDE command execution
Many tasks in Visual Studio require the use of the mouse or a hard-to-remember combination of keys. Those simple tasks can be invoked with AutoCode with a friendly name. For instance, to “close all documents but this” with AutoCode is as simple as invoking the ‘x’ command. By the way, to close all the documents is the ‘xx’ command.
Intellisense support for the hundred of commands
New in AutoCode 4.0 is the intellisense dialog box when pressing Ctrl+Enter. With this facility we can easily find the command we are looking for. As a fanatic AutoCode user I can say this is my favorite improvement in this new version and drastically increase the benefits of using AutoCode.
The dialog display a brief description for any of the available commands and if we press the help icon it will take us to a full information with source code of the selected command.
Another cool thing is that the parameters used when invoking a command are recorded as literals that can be reused.
And one more tip. Pressing the TAB key we can see the last executed commands in case we need to invoke them again.
New fancy commands
There are more than 100 commands coming with AutoCode 4.0 out of the box. Some of them are new in this version while others have been revised.
One of my favorite new command is the Evaluate command. This command, as its name suggest, compile and execute the piece of code selected in the editor. This is useful to evaluate some expressions without the need to compile the whole solution.
Code behind or partial templates
Also new in this version of AutoCode, templates can be defined in one file or split in several files.
The file with extension .autox contains the declarative part of the command and can reference other files. These files could be C# or VB.NET pure code (extension .cs or .vb) and also could be T4 like templates. This way command templates are more intelligible and easier to develop.
More powerful commands
AutoCode 4.0 now permits reference external assemblies so we can take advantage of custom libraries to generate code or execute powerful macros in more complex commands.
I hope these features makes AutoCode a helpful and productive tool for Visual Studio developers.
Happy Autocoding!
Alvaroma
Comments
Re: AutoCode 4.0 Released
posted by Nathaniel on Thursday, February 17, 2011
Thanks for the great product, one quick question/request, is it possible to subclass or in someway alter your DocumentHelper class? Specifically, our local backing fields are in the form of _PascalCase not _camelCase. Thanks
Re: AutoCode 4.0 Released
posted by Devprojects on Thursday, February 17, 2011
@Nathaniel
You can directly modify any template, changing ToUnderscore with ToPascalCase. For instance:
Change
get { return <#=ToUnderscore(args[1])#>; }
with
get { return _<#=ToPascalCase(args[1])#>; }
Re: AutoCode 4.0 Released
posted by Philipp on Tuesday, March 01, 2011
I would like use some methods from a custom library for dynamic code generation. Can you give an example how to reference such a library including all of its dependencies inside the CommandBase partial class?
Re: AutoCode 4.0 Released
posted by Mike on Wednesday, March 02, 2011
Absolutely LOVE Auto Code! Been waiting months for the 2010 release. Can't wait to try it out. :)
Re: AutoCode 4.0 Released
posted by DevProjects on Thursday, March 03, 2011
@Philipp
Please, reference to the last post Referencing external assemblies and custom libraries to see if that answer your question.
Re: AutoCode 4.0 Released
posted by John Sims on Thursday, June 02, 2011
I've been lost since upgrading to Visual Studio 2010 without AutoCode (I'm a former AutoCode 2008 user). Put a big smile on my face finding there is now a 2010 version today and what's more - all my AutoCode 2008 templates I wrote work with it :) Many Thanks!
