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
- Provides a tool to explore the RDT that follows recommended design patterns
- Exposes properties in the Properties window based on the selected item
- RDT events are captured on a grid
- Logged events are filtered by Tools/Options page options
- The user controls the display via a toolbar
- 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 (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.
To start the sample:
- Open the RdtEventExplorer.sln solution.
- Press F5 to build the sample, register it in the experimental instance, and launch Visual Studio from the experimental instance.
To see the sample's functionality:
- On the View menu, point to Other Windows and then click RdtEventExplorer. The Rdt Event Explorer tool window appears.
- On the Tools menu, click Options and then navigate to the RDT Event Explorer page.
- Set OptBeforeFirstDocumentLock to False, and then click OK.
- Open a new or existing Visual Studio project. The RDT events show up in the RDT Event Explorer grid. No OptBeforeFirstDocumentLock events appear.
- 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.
- To open a MyC file...
- On the File menu, select Open File.
- Find the tflow.myc file and click OK. You now have an open code window in which you can see a MyC file. All the identifiers are colored as you described on the Language Tokens page of the Language Service Wizard.
|