Two More Questions with Oleg Stepanov
Oleg Stepanov, software developer at JetBrains, continues our conversation about creating add-ins for Visual Studio 2010.
Peter Vogel: What are the major technical issues in creating add-ins for Visual Studio?
Oleg Stepanov: I won't go into detail about how complicated it is to create code analysis technology working in real time as a user enters code in the editor. Instead, let's talk about VS integration. The first thing one must remember when integrating with Visual Studio is that it is still mostly a single-threaded C++ COM application. So you have to mind CCW-s, RCW-s, message loops and STA.
One specific thing I should mention is that Visual Studio uses a lot of different allocators to gain memory, and this quickly fragments the virtual address space. As a result, at some point CLR is no longer able to allocate a continuous block of memory for its heap even though the there's still memory available in small chunks. This forced us to rethink some of our memory allocation patterns and even move out some of the data structures to an external process.
PV: Were there any special issues in getting out the new version of ReSharper for VS 2010?
OS: The most visible innovation in VS 2010 is of course the new shiny WPF code editor. We spent a good chunk of time just moving to the new API. Keeping in mind that ReSharper 5 supports a range of Visual Studio versions from 2005 to 2010, we had to make sure our abstraction layer over the VS API works consistently across the different versions of Visual Studio.
Another change, though not that visible, was the adoption of Managed Extensibility Framework (MEF) to manage components in Visual Studio, which has also become a new integration point for us. Happily, the VS development team was very helpful in the course of integrating ReSharper with Visual Studio 2010. They fixed a number of issues which were affecting us and generally helped us to improve stability and performance of ReSharper.
Posted by Peter Vogel on 06/21/2010