1 11 12 package org.eclipse.jdt.internal.ui.refactoring.code; 13 14 import org.eclipse.core.runtime.CoreException; 15 import org.eclipse.core.runtime.NullProgressMonitor; 16 17 import org.eclipse.jdt.internal.corext.refactoring.code.ExtractMethodRefactoring; 18 19 import org.eclipse.jdt.internal.ui.JavaPlugin; 20 import org.eclipse.jdt.internal.ui.refactoring.RefactoringMessages; 21 22 import org.eclipse.ltk.core.refactoring.Change; 23 import org.eclipse.ltk.ui.refactoring.RefactoringWizard; 24 25 public class ExtractMethodWizard extends RefactoringWizard { 26 27 static final String DIALOG_SETTING_SECTION= "ExtractMethodWizard"; 29 public ExtractMethodWizard(ExtractMethodRefactoring ref){ 30 super(ref, DIALOG_BASED_USER_INTERFACE | PREVIEW_EXPAND_FIRST_NODE); 31 setDefaultPageTitle(RefactoringMessages.ExtractMethodWizard_extract_method); 32 setDialogSettings(JavaPlugin.getDefault().getDialogSettings()); 33 } 34 35 public Change createChange(){ 36 try { 38 return getRefactoring().createChange(new NullProgressMonitor()); 39 } catch (CoreException e) { 40 JavaPlugin.log(e); 41 return null; 42 } 43 } 44 45 protected void addUserInputPages(){ 46 addPage(new ExtractMethodInputPage()); 47 } 48 } 49 | Popular Tags |