Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

VS2013 / Team Explorer vsix - How to get the currently selected TFS source control object(s)?

$
0
0

Greetings,

In the same vein as this similar project, I have added a new context menu option to the Source Control Explorer window, and I would like to get the Source Control Path of the selected items and cross-query it to some data I have mapped in a db and pop up a web page.

I believe that VersionControlExplorerExt (and its SelectedItems property) is what I'm after, but I am not sure what objects I need to create to get me there.  (ITeamExplorerPage.GetExtensibilityService off the current Team Explorer page was the root in the example linked to above, but the Version Control Explorer I didn't think was considered part of the pages collection.)

I tried another approach with this C#, but all the out variables return nulls:

IVersionControlProvider vcProvider = base.GetService(typeof(Microsoft.VisualStudio.TeamFoundation.VersionControl.IVersionControlProvider)) as Microsoft.VisualStudio.TeamFoundation.VersionControl.IVersionControlProvider; string [] filenames; int numberServerItems; int numberCodeBehindItems; int [] masterFileIndexes; string [] explicitFileNames;

vcProvider.GetSelectedItemsList2(true, out filenames, out numberServerItems, out numberCodeBehindItems, out masterFileIndexes, out explicitFileNames);


Any ideas on how to properly latch onto the source control explorer window with either of the above approaches, or something else entirely?

Thanks for looking,

--Jordan




Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>