Archive for March, 2010

NDjango: Closing the gap on the Visual Studio ASPX editor

Tuesday, March 23rd, 2010

One of glaring weaknesses of a proposition to use a view engine different from .aspx is that Visual Studio provides a very nice .aspx editor full of features both for editing the UI as well as .aspx source code, while this 'other' engine usually offers nothing of the sort - just a notepad to type in anything you want.

Not that I would ever dream of singlehandedly build something comparable to the Visual Studio .aspx designer, but the NDjango editor makes at least some of the .aspx editor features available for the NDjango users.

Let us go through the list:

Feature aspx editor NDjango editor
Syntax highlighting - clearly marks view engine constructs by highlighting the brackets separating the constructs from the rest of the template aspx syntax highlight ndjangosyntaxhhighlight
Code Completion - Shows a context specific list of available options as you type aspxcodecompletion ndjangoCodeCompletion
As you type diagnostics - highlights invalid items in the source code and provides diagnostic messages in the Visual Studio ErrorList DiagASP DiagNdjango
Item Hierarchy display - visualizes the nested constructs hierarchy HierarchyASP HierarchyNDjango

As anyone can clearly see the NDjango editor still has a long way to go, but IMHO the features it already supports can be of considerable help for the NDjango users.

NDjango editor for VS2010 – 2 down 1 to go

Monday, March 15th, 2010

From VS2010 Beta 1 to Beta 2 and now to RC. I will still need to port it (the editor) once more - from RC to the RTM, but for now enjoy the RC compatible version of the editor

This post is about my experience with the port and it will be really short because the port was pretty uneventful.

First of all the Intellisense Source interfaces (IQuickInfoSource, ICompletionSource) no longer have Get...Information methods. They have Augment...Session instead. Which for me makes more sense because now you can not only add completion sets from the source but also examine and even change existing elements in the completion set. These interfaces now also sport a Dispose method to help with the resource cleanup.

The changes were easy  - move the logic from GetCompletionInformation/GetToolTipContent method to the appropriate Augment method and add an empty Dispose method. Another small change is that there SquiggleTag is no longer which only made my life easier because now instead of deriving my own ErrorTag from SquiglleTag I can use the predefined ErrorTag.

And this is pretty much it.