Create an explorer that logs Running Document Table (RDT) events in Visual Studio.
- Technologies: Visual Studio 2015 SDK
- Topics: Visual Studio Shell, VSX
Description
This sample demonstrates how to create an explorer that logs Running Document Table (RDT) events. Selecting an event from the grid displays its properties in the Properties window.
Goals:
- Provide a tool to explore the RDT that follows recommended design patterns
- Log RDT events on a grid
- Select RDT event details from the grid to view them in the Properties window
- Filter logged events from the Tools > Options page
- Implement a toolbar in the RDT window with control options
- Tool window and dialog page share a singleton instance of options via automation
This sample has a package (RdtEventExplorerPkg) and a tool window (RDTEventWindowPane). The tool window hosts a UserControl (RdtEventControl). The options are set by a dialog page (RdtEventOptionsDialog) and filter the RDT events (derived from GenericEvent).
The explorer window hosts a toolbar and displays all unfiltered RDT events in a grid. Selecting an event in the grid displays its properties in the Properties window.
Requirements
Get all samples
Clone the repo (How to):
git clone https://github.com/Microsoft/VSSDK-Extensibility-Samples.git
Run the sample
- Press F5 to launch the visual studio experimental shell.
- Launch the Rdt Event Explorer tool window: View > Other Windows > RdtEventExplorer
- Modify properties of the RDT Event Explorer tool window: * Tools > Options > RDT Event Explorer * Set OptBeforeFirstDocumentLock to False, and then click OK. * Now OptBeforeFirstDocumentLock items will no longer appear in the RDT window
- Open a new or existing Visual Studio project. The RDT events show up in the RDT Event Explorer grid.
- Press F4 to open the Properties window.
- Select an event in the grid. The properties of that event appear in the Properties window.
- On the toolbar in the RDT Event Explorer, click Clear. Events are cleared from the grid.
Related topics