Q:

Get selected files in Check In and Pending Changes window?

My team does not have the option to upgrade to VS 2010, and thus cannot use its GatedCheckIn feature. I am developing a Visual Studio plugin to fill in this gap. Instead of coming up with a replica of the Check In and Pending Changes window, I'd like to know if it is possible to "hack" into Visual Studio's. Indeed, the built-in window allows you to do so many things, including checking in only a subset of files with pending changes via the tree view/list view with checkboxes. This approach will also minimize the learning curve of users of this plugin, since they can continue using the familiar interface while our plugin does the work in the background.
How does one go about catching events sent to inner elements of Visual Studio's tool windows? It is quite easy to intercept the Check In button click (or even the right-click->Check In... event on Source Explorer), but I have found no answer to this. The dialog itself is accessible via
_applicationObject.Windows.Item("{2456BD12-ECF7-4988-A4A6-67D49173F564}")
but it is not a UIHierarchy, so there is no supported way to obtain the Treeview of files with pending changes.
BuddyBuild, while sharing the same purpose, has its own GUI and thus doesn't quite offer what we want.
Thank you so much!

A:

There is an interface to get pending changes.
(There's also an event fired whenever this list changes, but I don't think it would be necessary to hook into that.)
If your "before check-in" event is happening on the click of the check-in button, you would also need to query conflicts and make they are all resolved, before auto-creating shelvesets and queuing your automated builds.
-Samer :)

