NDjango editor for VS2010 – 2 down 1 to go

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.

4 Responses to “NDjango editor for VS2010 – 2 down 1 to go”

  1. Rob G Says:

    Hey Mike,

    Great series on building this editor, I've been following it with great interest. Regarding the new Augment methods, you mention that you can also add/filter existing completion sets. I've been playing around with this and all I can get so far is a new Completion Set "tab" showing up next to the "All" tab and my completion items are not merged in alphabetically with the main "All" list - my terms only exist in my tab list for some reason.

    Did you find this a problem for your completion sets? Or do you do something special to merge your items in amongst all the other HTML tags etc?

    Keep up the great posts!
    All the best...

  2. Michael Feingold Says:

    This is exactly the difference between the old (beta2) design and what we have now in RC. Nobody is going to do your work for you - how do you want stuff combined with what's already there is up to you. When your source provides a brand new completion set the standard completion presenter just shows it in a separate tab. With the old design this was the only option immediately available (unless you write your own presenter). Now through the completion session you have access to the existing completion set and, I think you can try to mess with it in some way. I have to admit though that in my scenario it was not necessary and I did not try it myself. In my experience modifying the existing completion sets can be tricky

  3. Rob G Says:

    Thanks Mike - yeah unfortunately I haven't had any luck modifying it. It's a ReadOnlyCollection in some sort of COM wrapper it seems and any time you try and modify the set by adding items it throws a wobbly. Oh well, I'll just have to be happy with the extra tab until I can figure it out.

    Thanks again...

  4. Michael Feingold Says:

    Did you try to kill it? copy the content into your own and remove the collection?

Leave a Reply