1 11 package org.eclipse.ant.internal.ui.datatransfer; 12 13 import org.eclipse.ant.internal.ui.model.AntUIImages; 14 import org.eclipse.ant.internal.ui.model.IAntUIConstants; 15 import org.eclipse.jface.viewers.IStructuredSelection; 16 import org.eclipse.jface.wizard.Wizard; 17 import org.eclipse.ui.IImportWizard; 18 import org.eclipse.ui.IWorkbench; 19 20 public class AntBuildfileImportWizard extends Wizard implements IImportWizard { 21 22 private ExternalAntBuildfileImportPage mainPage; 23 24 public AntBuildfileImportWizard() { 25 super(); 26 } 27 28 31 public void addPages() { 32 super.addPages(); 33 mainPage = new ExternalAntBuildfileImportPage(); 34 addPage(mainPage); 35 } 36 37 40 public void init(IWorkbench workbench, IStructuredSelection currentSelection) { 41 setWindowTitle(DataTransferMessages.getString("AntBuildfileImportWizard.0")); setDefaultPageImageDescriptor(AntUIImages.getImageDescriptor(IAntUIConstants.IMG_IMPORT_WIZARD_BANNER)); 43 44 } 45 48 public boolean performCancel() { 49 return true; 50 } 51 52 55 public boolean performFinish() { 56 return (mainPage.createProject() != null); 57 } 58 } | Popular Tags |