Hi!
I'm developing a VSIX extension for Visual Studio to keep track of useful Unit Test information.
To help the interaction with this extension, i've managed to add button on the Test Result and Test Explorer Context Menus. When the Click Event is fired, i cannot get the Selected Item in any of the Windows.
I've tried to look into the windows on EnvDTE, but i can't downcast to it's original type.
The code that i'm using is:
var dte2 = (EnvDTE80.DTE2)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.12.0");
if (dte2.ActiveWindow.Caption == "Test Explorer" || dte2.ActiveWindow.Caption == "Test Results") {
// do stuff here
}Is there any way to get the SelectedItem, or, in the worst case scenario, the Name of the Test in the Selected Item?
Thank you!