1 11 package org.eclipse.pde.internal.ui.wizards.tools; 12 13 import java.lang.reflect.InvocationTargetException ; 14 import java.util.ArrayList ; 15 16 import org.eclipse.jface.wizard.Wizard; 17 import org.eclipse.pde.internal.ui.PDEPlugin; 18 import org.eclipse.pde.internal.ui.PDEPluginImages; 19 import org.eclipse.pde.internal.ui.PDEUIMessages; 20 21 public class OrganizeManifestsWizard extends Wizard { 22 23 private OrganizeManifestsWizardPage fMainPage; 24 private ArrayList fProjects; 25 26 public OrganizeManifestsWizard(ArrayList projects) { 27 fProjects = projects; 28 setNeedsProgressMonitor(true); 29 setWindowTitle(PDEUIMessages.OrganizeManifestsWizard_title); 30 setDialogSettings(PDEPlugin.getDefault().getDialogSettings()); 31 setDefaultPageImageDescriptor(PDEPluginImages.DESC_ORGANIZE_MANIFESTS); 32 } 33 34 public boolean performFinish() { 35 fMainPage.preformOk(); 36 try { 37 OrganizeManifestsOperation op = new OrganizeManifestsOperation(fProjects); 38 op.setOperations(fMainPage.getSettings()); 39 getContainer().run(false, true, op); 40 } catch (InvocationTargetException e) { 41 PDEPlugin.log(e); 42 return false; 43 } catch (InterruptedException e) { 44 PDEPlugin.log(e); 45 return false; 46 } 47 return true; 48 } 49 50 public void addPages() { 51 fMainPage = new OrganizeManifestsWizardPage(); 52 addPage(fMainPage); 53 } 54 } 55 | Popular Tags |