private void RemoveLicenseHeaderFromAllFilesInSolutionCallback(object sender, EventArgs e) { Solution solution = _dte.Solution; IVsStatusbar statusBar = (IVsStatusbar)GetService(typeof(SVsStatusbar)); var removeLicenseHeaderFromAllProjects = new RemoveLicenseHeaderFromAllFilesInSolutionCommand(statusBar, _licenseReplacer); bool resharperSuspended = CommandUtility.ExecuteCommandIfExists("ReSharper_Suspend", _dte); try { removeLicenseHeaderFromAllProjects.Execute(solution); } catch (Exception exception) { MessageBoxHelper.Information( string.Format( "The command '{0}' failed with the exception '{1}'. See Visual Studio Output Window for Details.", removeLicenseHeaderFromAllProjects.GetCommandName(), exception.Message)); OutputWindowHandler.WriteMessage(exception.ToString()); } if (resharperSuspended) { CommandUtility.ExecuteCommand("ReSharper_Resume", _dte); } }
private void ResumeResharper() { if (_resharperSuspended) { CommandUtility.ExecuteCommand("ReSharper_Resume", _dte2); } }
private void RemoveLicenseHeaderFromAllProjectsCallback(object sender, EventArgs e) { Solution solution = _dte.Solution; IVsStatusbar statusBar = (IVsStatusbar)GetService(typeof(SVsStatusbar)); var removeLicenseHeaderFromAllProjects = new RemoveLicenseHeaderFromAllProjectsCommand(statusBar, _licenseReplacer); bool resharperSuspended = CommandUtility.ExecuteCommandIfExists("ReSharper_Suspend", _dte); removeLicenseHeaderFromAllProjects.Execute(solution); if (resharperSuspended) { CommandUtility.ExecuteCommand("ReSharper_Resume", _dte); } }