private void ShowDeprecationBar() { const string message = "Newer versions of SonarLint will not work with this version of Visual Studio. Please " + "update to Visual Studio 2015 Update 3 or Visual Studio 2017 to benefit from new features."; deprecationBar = infoBarManager.AttachInfoBar(DeprecationBarGuid, message, default(ImageMoniker)); }
private void ShowDeprecationBar() { const string message = "SonarLint for Visual Studio versions 4.0+ will no longer support this version of Visual " + "Studio. Please update to Visual Studio 2015 Update 3 or Visual Studio 2017 to benefit from new features."; deprecationBar = infoBarManager.AttachInfoBar(DeprecationBarGuid, message, default(ImageMoniker)); }
/// <summary> /// Update /// </summary> /// <param name="customInfoBarMessage">Optional. If provided than this will be the message that will appear in info bar, otherwise a standard one will appear instead</param> private void UpdateRequired(string customInfoBarMessage = null) { this.AssertOnUIThread(); IInfoBarManager manager = this.host.GetMefService <IInfoBarManager>(); if (manager == null) { Debug.Fail("Cannot find IInfoBarManager"); return; } this.currentErrorWindowInfoBar = manager.AttachInfoBar( ErrorListToolWindowGuid, customInfoBarMessage ?? Strings.SonarLintInfoBarUnboundProjectsMessage, Strings.SonarLintInfoBarUpdateCommandText, KnownMonikers.RuleWarning); if (this.currentErrorWindowInfoBar == null) { this.OutputMessage(Strings.SonarLintFailedToAttachInfoBarToErrorList); Debug.Fail("Failed to add an info bar to the error list tool window"); } else { TelemetryLoggerAccessor.GetLogger(this.host)?.ReportEvent(TelemetryEvent.ErrorListInfoBarShow); this.currentErrorWindowInfoBar.Closed += this.CurrentErrorWindowInfoBar_Closed; this.currentErrorWindowInfoBar.ButtonClick += this.CurrentErrorWindowInfoBar_ButtonClick; // Need to capture the current binding information since the user can change the binding // and running the Update should just no-op in that case. var solutionBinding = this.host.GetService <ISolutionBindingSerializer>(); solutionBinding.AssertLocalServiceIsNotNull(); this.infoBarBinding = solutionBinding.ReadSolutionBinding(); } }