SonarLint.VisualStudio.Progress.Controller.ErrorNotification.VsOutputWindowPaneNotifier.ShowOutputWindowFrame C# (CSharp) Method

ShowOutputWindowFrame() private method

private ShowOutputWindowFrame ( IServiceProvider serviceProvider ) : void
serviceProvider IServiceProvider
return void
        private static void ShowOutputWindowFrame(IServiceProvider serviceProvider)
        {
            Debug.Assert(serviceProvider != null, "Supplied service provider should not be null");

            // Calling "Activate" on its own isn't enough if the Output window isn't already being shown
            // we need to explicitly call "Show" on the window.
            IVsUIShell shell = serviceProvider.GetService(typeof(SVsUIShell)) as IVsUIShell;
            if (shell != null)
            {
                IVsWindowFrame windowFrame;
                int hr = shell.FindToolWindow(0, VSConstants.StandardToolWindows.Output, out windowFrame);
                Debug.Assert(ErrorHandler.Succeeded(hr), "Call to IVsUIShell FindTooWindow failed.");
                if (ErrorHandler.Succeeded(hr) && windowFrame != null)
                {
                    windowFrame.Show();
                }
            }
        }
        #endregion