Monday, 8 September 2008 05:32 by
Bill Henning
We just released build 276 of SyntaxEditor and its add-ons. This build has more general tweaks and bug fixes, along with some major updates to the IntelliPrompt capabilities for C#/VB via the .NET Languages Add-on.
Here are some of the major new updates. There are a lot of small enhancements in IntelliPrompt across the board as well.
Anonymous Types
IntelliPrompt now works for anonymous types. It will construct a type definition behind the scenes that contains the properties you specify and will use that type definition for constructing IntelliPrompt UI.
| SyntaxEditor showing a member list for a property that is several levels deep in anonymous types |
In the screen above, both abc and def are implicitly defined anonymous types. You can see how SyntaxEditor correctly identifies the Now property on the abc anonymous type as a DateTime.
Extension Method Application
We have really enhanced the way that we determine which extension methods are applied to various types. In previous builds there were a number of cases where extension methods could be applied to inappropriate types. With our new code updates, the add-on attempts to resolve the parameters down to really determine if an extension method applies to a type, even if the type is a complex generic one.
| A member list showing how extension methods are applied properly based on the source type |
In the screen above, note how the AGoodTextExt extension method appears in the member list, while ABadTestExt does not since the latter is for enumerable int objects, not enumerable char objects.
Extension Method Quick/Parameter Info
The code updates also include some more updates to the quick and parameter info that is displayed for extension methods. It will attempt to resolve the generic parameters into their "real" types for display to the end user.
| A member list showing how LINQ's Enumerable extension methods have been applied to a list variable, and how the quick info correctly displays the return value as IEnumerable<int> |
In the screen above, the quick info used to say IEnumerable<T> in previous builds, but now says IEnumerable<int>. We will be making other improvements in this area in the future.
Implicit Variable Declarations in VB
While our C# implementation has had var support for a while, we now have implicit variable declarations working in VB as well.
| A member list displayed for a variable that was implicitly declared |
In the screen above, SyntaxEditor correctly displays the members for the ApplicationException type since that type was used to initialize the variable var.