Visual Studio 2010 Editor Extension Demo for Runtime Intelligence Integration

Project Description

A Visual Studio 2010 editor extension that demonstrates source code editor integration with data from PreEmptive Solutions' Runtime Intelligence Service. This code was shown at PDC 2009 in session FT23, "Extending the VS 2010 Code Editor to Visualize Runtime Intelligence". Integrating Runtime Intelligence with Visual Studio enables a new, general purpose and scalable connection between application usage, performance, and stability in production and in ongoing development.

Highlights

The source code demonstrates a number of the code editor’s extension points. First, it shows you how to create a custom margin. The margin tracks the viewport and provides a document map, which shows the methods in the source file that have Runtime Intelligence data available. Background parsing of the text buffer as it changes ensures that the document map is kept in sync with the source code. You can use the document map to quickly navigate to a target method, then with a mouse click, toggle the visibility of the Runtime Intelligence data.

It also shows you how to create and manage adornments that are laid out inline with the code in the editor. Each inline adornment is a WPF chart control showing the Runtime Intelligence data as pulled from an external source. When you toggle a chart’s visibility, the source code view expands or shrinks to accommodate the chart.

Last, the source code demonstrates how to create an adornment that overlays the editor. It creates a “lightboxing effect” that highlights the method to which a visible chart is attached.

Requirements

  • Visual Studio 2010 Beta 2
  • Visual Studio 2010 Beta 2 SDK

Getting Started

  1. Ensure that you have Visual Studio 2010 Beta 2 and the Visual Studio SDK installed.
  2. Download the release and unzip it.
  3. Open the solution file in Visual Studio 2010 Beta 2.
  4. Press F5 to build and run. This will first build the solution and deploy the editor extension’s VSIX package to the Visual Studio SDK’s “experimental hive” configuration location. Then it will launch the experimental version of VS 2010 with the editor extension loaded.
  5. From inside the experimental version, open one of the sample source files (located in Trunk\SampleData). Once the file is loaded, you should see the extension in the editor, similar to the screenshot below.
  6. Right click on a margin glyph to navigate to a method with an inline chart; left click the glyph to toggle the chart’s visibility.

Runtime Intelligence Editor Extension Demo

References

Last edited Dec 14 2009 at 9:28 PM by PreEmptive, version 4

 

Want to leave feedback?
Please use Discussions or Reviews instead.

Updating...
© 2006-2010 Microsoft | Get Help | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2010.7.20.17027