コード例 #1
0
        internal static void OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var output = GetConsoleOutput(sender);

            if (output != null)
            {
                var errorLocation = parser.GetError(output.GetPositionFromPoint(e.GetPosition(output), true));
                if (errorLocation != null)
                {
                    string path = errorLocation.Path;
                    if (!File.Exists(path))
                    {
                        var console          = GetTaskRunnerConsole(output);
                        var workingDirectory = GetWorkingDirectory(console);
                        path = Path.Combine(workingDirectory, path);
                    }

                    if (File.Exists(path))
                    {
                        TreGoToFilePackage.DTE.OpenFileInPreviewTab(path, errorLocation.Line, errorLocation.Column);
                    }
                }
            }
        }