/// <summary> /// Navigate from a parsed stack frame to source code line. /// </summary> /// <param name="errorGroupItem">The error group item that will be shown in the source code tooltip.</param> /// <param name="stackFrame">The stack frame that contains the source file and source line number.</param> public static void ErrorFrameToSourceLine( ErrorGroupItem errorGroupItem, ErrorReporting.StackFrame stackFrame) { ThreadHelper.ThrowIfNotOnUIThread(); if (errorGroupItem == null || stackFrame == null || !stackFrame.IsWellParsed) { throw new ArgumentException("Invalid argument"); } ProjectSourceFile projectFile = null; SolutionHelper solution = SolutionHelper.CurrentSolution; if (solution != null) { var items = solution.FindMatchingSourceFile(stackFrame.SourceFile); if (items.Count > 1) { var index = PickFileDialog.PickFileWindow.PromptUser(items.Select(x => x.FullName)); if (index < 0) { return; } projectFile = items.ElementAt(index); } else { projectFile = items.FirstOrDefault(); } } if (projectFile == null) { SourceVersionUtils.FileItemNotFoundPrompt(stackFrame.SourceFile); return; } var window = ShellUtils.Default.Open(projectFile.FullName); if (window == null) { FailedToOpenFilePrompt(stackFrame.SourceFile); return; } ShowToolTip(errorGroupItem, stackFrame, window); }