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