public void Fix() { if (string.IsNullOrEmpty(Properties.NewName)) { Refactoring.Run(Options); return; } //FIXME: performchanges should probably use a monitor too, as it can be slow var changes = Refactoring.PerformChanges(Options, Properties); if (Preview) { MessageService.ShowCustomDialog(new RefactoringPreviewDialog(changes)); } else { var monitor = IdeApp.Workbench.ProgressMonitors.GetBackgroundProgressMonitor("Rename", null); RefactoringService.AcceptChanges(monitor, changes); } }