Creating a Visual Studio Extension
How to use the Visual Studio Wizard to create an appropriate C# project for writing an extension plus several links to online resoures.
Class SourceFileParser - look for test macros within files of project dir
Class SourceFileParser parses all .cpp files within the directory of the current startup project and all of its sub directories. Any found test cases of type BOOST or TTB will be extracted and prepared for presentation at GUI.
Class Executor - process execution and redirection of output
Class Executor supports starting of a test application. Arbitrary start arguments can be passed to the test executable. The output of the test process is redirected to a special output pane within Visual Studio. When the test process terminates Executor will send a notification to TestExecWin to allow proper GUI updates.
Class MyToolWindow
Class MyToolWindow is the main class which instantiates the helper classes VisualStudioConnector, SourceFileParser and Executor and establishes all required connections between them. Furthermore the utility function WriteLine which allows writing to log pane of TestExecWin is implemented here. To reduce coupling TestExecWindow implements the interfaces IMainEvents and IEventReceiver which may be called by other classes.
Class MyToolWindowControl within MyToolWindowControl.xaml.cs
is the typical GUI control class containing all button handlers and all code to manipulate GUI controls. Corresponding status data are stored to allow proper initialization and refresh of GUI display.
MyToolWindowControl.xaml
is the typical layout file in XAML format. Here you can define all controls and their arrangement on screen. You can either directly edit the XAML file with the text editor or you can move controls from the ToolBox to the design editor and drag them around with the mouse.