Search Wiki:

VCExtensibilitySample

The add-in is not, itself, a useful program that will make your life easier. However, it exercises most of the properties and methods found in this document, and will therefore give you a good “jumping-off” point for writing your own add-in.

Requirements


Building and running the sample

To build and execute the sample, press F5 after the sample is loaded

Once you have built the sample, you should see it at the top of the “Tools” menu when you are running Visual Studio. The add-in will not do anything interesting until you are actually in version control. So connect to Team Foundation Server, and open up a project that is under version control. Now, whenever you choose “VC tool windows...” from the Tools menu, you will see the following dialog.

VCExtensibilitySample.png

This dialog is called the “Choose Form” and its code is in ChooseForm.cs. If you view the code for that file, you will see, for instance, the code to register event handlers so you can receive notification whenever selection changes in the VCS tool windows. If you click—just to pick an example—“Source Control Explorer...”, the add-in brings up a dialog that shows you information about the Source Control Explorer (SCE). You can see the current workspace, current folder, how many items are selected, and so on. You can also go from there to another dialog that gives more information on all the currently selected items. Going back to ChooseForm.cs, you can see that the window that tells you all about the SCE is called the SCEInfo. So if you go to SCEInfo.cs you can see all the function calls that give your add-in access to information about the Source Control Explorer.
Last edited Oct 20 2009 at 2:39 AM  by JimLamb, version 8
Updating...
Page view tracker