0

I am developing a Visual Studio Extension. I need to access the Source Control's History window to check what history items are selected or not.

I've tried several methods including the findWindowPane() method and the activeWindow object, but none of them worked. (I didn't know all the parameters for findWindowPane() and the activeWindow doesn't have any info about specific tool window data)

Update

So I've checked the solution on this page: Show item history windows with TFS SDK Unfortunately, when I'm trying to get the type of the history window, the result is null.

Type _dialogHistoryType;

Assembly tfsAssembly = typeof(Microsoft.TeamFoundation.VersionControl.Controls.LocalPathLinkBox).Assembly;
_dialogHistoryType = tfsAssembly.GetType("Microsoft.TeamFoundation.VersionControl.Controls.DialogHistory");
var historyWindow = package.FindToolWindow(_dialogHistoryType, 0, false);

My main goal is to get the selected history item's id from the history window during runtime.

Any suggestion, how to get the type?

Manfred Radlwimmer
  • 13,257
  • 13
  • 53
  • 62
Belian
  • 114
  • 8
  • 1
    is it the same issue as this one https://stackoverflow.com/questions/48061180/how-to-get-the-selected-items-on-source-control-history-window-when-creating-a-v?, sorry for I didn't get Email update for that case. For this issue, maybe you could use certain tool to help you find the specific class or UT control, and then it would help you write the custom code like this one: https://stackoverflow.com/questions/8267888/show-item-history-windows-with-tfs-sdk, this is just about the changeset history: http://www.aymanzaza.com/2012/01/15/get-latest-changeset-history-from-version-control/ – Jack Zhai Feb 05 '18 at 02:15
  • Yes they are the same, thanks for the answer, i will check it out! :) – Belian Feb 05 '18 at 09:43

0 Answers0