1 19 20 package org.netbeans.modules.apisupport.project.ui.customizer; 21 22 import java.io.IOException ; 23 import java.util.Set ; 24 import org.netbeans.api.project.Project; 25 import org.netbeans.modules.apisupport.project.NbModuleProject; 26 import org.netbeans.modules.apisupport.project.suite.SuiteProject; 27 import org.netbeans.spi.project.support.ant.AntProjectHelper; 28 import org.netbeans.spi.project.support.ant.PropertyEvaluator; 29 import org.netbeans.spi.project.ui.support.ProjectCustomizer; 30 import org.openide.util.Lookup; 31 import org.openide.util.NbBundle; 32 import org.openide.util.lookup.Lookups; 33 34 39 public final class SuiteCustomizer extends BasicCustomizer { 40 41 static final String SOURCES = "Sources"; static final String LIBRARIES = "Libraries"; public static final String APPLICATION = "Application"; public static final String APPLICATION_CREATE_STANDALONE_APPLICATION = "standaloneApp"; static final String SPLASH_SCREEN = "SplashScreen"; 48 private final AntProjectHelper helper; 49 private final PropertyEvaluator evaluator; 50 51 private SuiteProperties suiteProps; 52 53 public SuiteCustomizer(Project project, AntProjectHelper helper, 54 PropertyEvaluator evaluator) { 55 super(project, "Projects/org-netbeans-modules-apisupport-project-suite/Customizer"); 56 this.helper = helper; 57 this.evaluator = evaluator; 58 } 59 60 void storeProperties() throws IOException { 61 suiteProps.triggerLazyStorages(); 62 suiteProps.storeProperties(); 63 } 64 65 void dialogCleanup() { 66 suiteProps = null; 67 } 68 69 void postSave() { } 70 71 protected Lookup prepareData() { 72 Set <NbModuleProject> subModules = SuiteUtils.getSubProjects(getProject()); 73 suiteProps = new SuiteProperties((SuiteProject) getProject(), helper, evaluator, subModules); 74 return Lookups.fixed(suiteProps, getProject()); 75 } 76 } 77 78 | Popular Tags |