1 11 12 package org.eclipse.ant.internal.ui.datatransfer; 13 14 import java.util.List ; 15 16 import org.eclipse.ant.internal.ui.AntUIImages; 17 import org.eclipse.ant.internal.ui.IAntUIConstants; 18 import org.eclipse.jface.viewers.IStructuredSelection; 19 import org.eclipse.jface.wizard.Wizard; 20 import org.eclipse.ui.IExportWizard; 21 import org.eclipse.ui.IWorkbench; 22 23 26 public class AntBuildfileExportWizard extends Wizard implements IExportWizard 27 { 28 private IStructuredSelection fSelection; 29 private AntBuildfileExportPage fMainPage; 30 31 34 public boolean performFinish() 35 { 36 return fMainPage.generateBuildfiles(); 37 } 38 39 public void addPages() 40 { 41 fMainPage = new AntBuildfileExportPage(); 42 List projects = fSelection.toList(); 43 fMainPage.setSelectedProjects(projects); 44 addPage(fMainPage); 45 } 46 47 public void init(IWorkbench workbench, IStructuredSelection selection) 48 { 49 setWindowTitle(DataTransferMessages.AntBuildfileExportWizard_0); 50 setDefaultPageImageDescriptor(AntUIImages.getImageDescriptor(IAntUIConstants.IMG_EXPORT_WIZARD_BANNER)); 51 fSelection= selection; 52 } 53 } 54 | Popular Tags |