1 19 20 package org.netbeans.modules.apisupport.project.ui.wizard.action; 21 22 import java.io.IOException ; 23 import java.util.Set ; 24 import org.netbeans.modules.apisupport.project.CreatedModifiedFiles; 25 import org.netbeans.modules.apisupport.project.ui.wizard.BasicWizardIterator; 26 import org.openide.WizardDescriptor; 27 28 33 final class NewActionIterator extends BasicWizardIterator { 34 35 private DataModel data; 36 37 private NewActionIterator() {} 38 39 public static NewActionIterator createIterator() { 40 return new NewActionIterator(); 41 } 42 43 public Set instantiate() throws IOException { 44 CreatedModifiedFiles cmf = data.getCreatedModifiedFiles(); 45 cmf.run(); 46 return getCreatedFiles(cmf, data.getProject()); 47 } 48 49 protected BasicWizardIterator.Panel[] createPanels(WizardDescriptor wiz) { 50 data = new DataModel(wiz); 51 return new BasicWizardIterator.Panel[] { 52 new ActionTypePanel(wiz, data), 53 new GUIRegistrationPanel(wiz, data), 54 new NameIconLocationPanel(wiz, data) 55 }; 56 } 57 58 public void uninitialize(WizardDescriptor wiz) { 59 super.uninitialize(wiz); 60 data = null; 61 } 62 63 } 64 | Popular Tags |