1 11 package org.eclipse.ltk.ui.refactoring; 12 13 import org.eclipse.ltk.core.refactoring.Change; 14 import org.eclipse.ltk.core.refactoring.PerformChangeOperation; 15 import org.eclipse.ltk.core.refactoring.RefactoringStatus; 16 17 import org.eclipse.ltk.internal.ui.refactoring.RefactoringStatusDialog; 18 import org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog; 19 import org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2; 20 import org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation; 21 import org.eclipse.ltk.internal.ui.refactoring.history.RefactoringHistoryControl; 22 import org.eclipse.ltk.internal.ui.refactoring.history.SortableRefactoringHistoryControl; 23 24 import org.eclipse.swt.widgets.Composite; 25 import org.eclipse.swt.widgets.Shell; 26 27 import org.eclipse.jface.dialogs.Dialog; 28 29 import org.eclipse.ltk.ui.refactoring.history.IRefactoringHistoryControl; 30 import org.eclipse.ltk.ui.refactoring.history.ISortableRefactoringHistoryControl; 31 import org.eclipse.ltk.ui.refactoring.history.RefactoringHistoryControlConfiguration; 32 33 42 public class RefactoringUI { 43 44 67 public static Dialog createLightWeightStatusDialog(RefactoringStatus status, Shell parent, String windowTitle) { 68 return new RefactoringStatusDialog(status, parent, windowTitle, false, true); 69 } 70 71 84 public static Composite createRefactoringHistoryControl(Composite parent, RefactoringHistoryControlConfiguration configuration) { 85 return new RefactoringHistoryControl(parent, configuration); 86 } 87 88 112 public static Dialog createRefactoringStatusDialog(RefactoringStatus status, Shell parent, String windowTitle, boolean backButton) { 113 return new RefactoringStatusDialog(status, parent, windowTitle, backButton); 114 } 115 116 131 static Dialog createRefactoringWizardDialog(RefactoringWizard wizard, Shell parent) { 132 Dialog result; 133 if (wizard.needsWizardBasedUserInterface()) 134 result= new RefactoringWizardDialog(parent, wizard); 135 else 136 result= new RefactoringWizardDialog2(parent, wizard); 137 return result; 138 } 139 140 153 public static Composite createSortableRefactoringHistoryControl(Composite parent, RefactoringHistoryControlConfiguration configuration) { 154 return new SortableRefactoringHistoryControl(parent, configuration); 155 } 156 157 171 public static PerformChangeOperation createUIAwareChangeOperation(Change change) { 172 return new UIPerformChangeOperation(null, change, null); 173 } 174 175 private RefactoringUI() { 176 } 178 } 179 | Popular Tags |