void OnOKClicked(object sender, EventArgs e) { var properties = Properties; ((Widget)this).Destroy(); List <Change> changes = rename.PerformChanges(options, properties); IProgressMonitor monitor = IdeApp.Workbench.ProgressMonitors.GetBackgroundProgressMonitor(this.Title, null); RefactoringService.AcceptChanges(monitor, options.Dom, changes); }
public void Fix() { //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(Options.Dom, changes)); } else { var monitor = IdeApp.Workbench.ProgressMonitors.GetBackgroundProgressMonitor("Rename", null); RefactoringService.AcceptChanges(monitor, Options.Dom, changes); } }
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) { using (var dlg = new RefactoringPreviewDialog(changes)) MessageService.ShowCustomDialog(dlg); } else { var monitor = IdeApp.Workbench.ProgressMonitors.GetBackgroundProgressMonitor("Rename", null); RefactoringService.AcceptChanges(monitor, changes); } }