1 11 package org.eclipse.ui.internal.wizards.preferences; 12 13 import org.eclipse.jface.dialogs.IDialogSettings; 14 import org.eclipse.jface.viewers.IStructuredSelection; 15 import org.eclipse.jface.wizard.Wizard; 16 import org.eclipse.ui.IExportWizard; 17 import org.eclipse.ui.IWorkbench; 18 import org.eclipse.ui.internal.IWorkbenchGraphicConstants; 19 import org.eclipse.ui.internal.WorkbenchImages; 20 import org.eclipse.ui.internal.WorkbenchPlugin; 21 22 46 public class PreferencesExportWizard extends Wizard implements IExportWizard { 47 48 private WizardPreferencesExportPage1 mainPage; 49 50 53 public PreferencesExportWizard() { 54 IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault().getDialogSettings(); 55 IDialogSettings section = workbenchSettings 56 .getSection("PreferencesExportWizard"); if (section == null) { 58 section = workbenchSettings.addNewSection("PreferencesExportWizard"); } 60 setDialogSettings(section); 61 } 62 63 66 public void addPages() { 67 super.addPages(); 68 mainPage = new WizardPreferencesExportPage1(); 69 addPage(mainPage); 70 } 71 72 75 public void init(IWorkbench workbench, IStructuredSelection currentSelection) { 76 setWindowTitle(PreferencesMessages.PreferencesExportWizard_export); 77 setDefaultPageImageDescriptor(WorkbenchImages 78 .getImageDescriptor(IWorkbenchGraphicConstants.IMG_WIZBAN_EXPORT_PREF_WIZ)); 79 setNeedsProgressMonitor(true); 80 } 81 82 85 public boolean performFinish() { 86 return mainPage.finish(); 87 } 88 89 90 } 91 | Popular Tags |