? j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SECompositePanelProvider.java Index: j2seproject/arch.xml =================================================================== RCS file: /cvs/java/j2seproject/arch.xml,v retrieving revision 1.10 diff -c -r1.10 arch.xml *** j2seproject/arch.xml 10 Jan 2006 16:24:21 -0000 1.10 --- j2seproject/arch.xml 18 Apr 2006 12:21:33 -0000 *************** *** 1054,1068 **** As this is some kind of intermodule dependency, it is a kind of API. Please describe it and classify according to ! common stability categories. --> !

! No. !

--- 1054,1074 ---- As this is some kind of intermodule dependency, it is a kind of API. Please describe it and classify according to ! common stability categories. --> ! !

! "Projects/J2SEProject/Customizer" folder's content is used to construct the project's customizer. ! It's content is expected to be ProjectCustomizer.CompositeCategoryProvider instances. ! The lookup passed to the panels contains an instance of Project and org.netbeans.modules.java.j2seproject.ui.customizer.J2SEProjectProperties ! Please note that the latter is not part of any public APIs and you need implementation dependency to make use of it. !

!
!
*************** *** 1097,1102 **** --- 1103,1164 ----

No. +

+
+ + + + + + + + + + + + + +

+ XXX no answer for compat-deprecation +

+
+ + + + + +

+ XXX no answer for exec-ant-tasks

Index: j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties =================================================================== RCS file: /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties,v retrieving revision 1.79 diff -c -r1.79 Bundle.properties *** j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties 7 Oct 2005 11:01:34 -0000 1.79 --- j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties 18 Apr 2006 12:21:33 -0000 *************** *** 13,33 **** LBL_Customizer_Title=Project Properties - {0} # Configuration node labels ! LBL_Config_BuildCategory=Build ! LBL_Config_RunCategory=Run X ! LBL_Config_ProjectDependencies=Required Projects X LBL_Config_Libraries=Libraries LBL_Config_Sources=Sources LBL_Config_Build=Compiling ! LBL_Config_BuildTests=Compiling Tests X LBL_Config_Jar=Packaging LBL_Config_Javadoc=Documenting LBL_Config_Run=Run ! LBL_Config_Test=Running Tests X ! LBL_Config_Debug=Running in Debugger X LBL_Config_WebServiceClients=Web Service Clients - LBL_Config_WebServices=Web Services # Panels --- 13,33 ---- LBL_Customizer_Title=Project Properties - {0} # Configuration node labels ! Projects/J2SEProject/Customizer/BuildCategory=Build ! Projects/J2SEProject/Customizer/WebServiceCategory=Web Services ! #LBL_Config_RunCategory=Run X ! #LBL_Config_ProjectDependencies=Required Projects X LBL_Config_Libraries=Libraries LBL_Config_Sources=Sources LBL_Config_Build=Compiling ! #LBL_Config_BuildTests=Compiling Tests X LBL_Config_Jar=Packaging LBL_Config_Javadoc=Documenting LBL_Config_Run=Run ! #LBL_Config_Test=Running Tests X ! #LBL_Config_Debug=Running in Debugger X LBL_Config_WebServiceClients=Web Service Clients # Panels Index: j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerLibraries.java =================================================================== RCS file: /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerLibraries.java,v retrieving revision 1.14 diff -c -r1.14 CustomizerLibraries.java *** j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerLibraries.java 9 Nov 2005 15:06:16 -0000 1.14 --- j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerLibraries.java 18 Apr 2006 12:21:33 -0000 *************** *** 36,42 **** * * @author phrebejk */ ! public class CustomizerLibraries extends JPanel implements HelpCtx.Provider, ListDataListener, CustomizerProviderImpl.SubCategoryProvider { public static final String COMPILE = "COMPILE"; //NOI18N public static final String RUN = "RUN"; //NOI18N --- 36,42 ---- * * @author phrebejk */ ! public class CustomizerLibraries extends JPanel implements HelpCtx.Provider, ListDataListener { public static final String COMPILE = "COMPILE"; //NOI18N public static final String RUN = "RUN"; //NOI18N *************** *** 45,51 **** private final J2SEProjectProperties uiProperties; ! public CustomizerLibraries( J2SEProjectProperties uiProperties ) { this.uiProperties = uiProperties; initComponents(); --- 45,51 ---- private final J2SEProjectProperties uiProperties; ! public CustomizerLibraries( J2SEProjectProperties uiProperties, CustomizerProviderImpl.SubCategoryProvider subcat ) { this.uiProperties = uiProperties; initComponents(); *************** *** 118,123 **** --- 118,126 ---- } }); testBroken(); + if (J2SECompositePanelProvider.LIBRARIES.equals(subcat.getCategory())) { + showSubCategory(subcat.getSubcategory()); + } uiProperties.JAVAC_CLASSPATH_MODEL.addListDataListener( this ); uiProperties.JAVAC_TEST_CLASSPATH_MODEL.addListDataListener( this ); *************** *** 182,188 **** } ! public void showSubCategory (String name) { if (name.equals(COMPILE)) { jTabbedPane1.setSelectedIndex (0); } --- 185,191 ---- } ! private void showSubCategory (String name) { if (name.equals(COMPILE)) { jTabbedPane1.setSelectedIndex (0); } Index: j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerProviderImpl.java =================================================================== RCS file: /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerProviderImpl.java,v retrieving revision 1.5 diff -c -r1.5 CustomizerProviderImpl.java *** j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerProviderImpl.java 20 Aug 2005 08:10:13 -0000 1.5 --- j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerProviderImpl.java 18 Apr 2006 12:21:33 -0000 *************** *** 38,44 **** --- 38,46 ---- import org.netbeans.spi.project.ui.CustomizerProvider; import org.netbeans.spi.project.ui.support.ProjectCustomizer; import org.openide.util.HelpCtx; + import org.openide.util.Lookup; import org.openide.util.NbBundle; + import org.openide.util.lookup.Lookups; /** Customization of J2SE project *************** *** 63,68 **** --- 65,72 ---- // Option command names private static final String COMMAND_OK = "OK"; // NOI18N private static final String COMMAND_CANCEL = "CANCEL"; // NOI18N + + public static final String CUSTOMIZER_FOLDER_PATH = "Projects/J2SEProject/Customizer"; //NO18N private static Map /**/project2Dialog = new HashMap(); *************** *** 87,267 **** Dialog dialog = (Dialog)project2Dialog.get (project); if ( dialog != null ) { ! dialog.show (); return; } else { ! J2SEProjectProperties uiProperties = new J2SEProjectProperties( (J2SEProject)project, updateHelper, evaluator, refHelper, genFileHelper ); ! init( uiProperties ); OptionListener listener = new OptionListener( project, uiProperties ); ! // HelpCtx helpCtx = new HelpCtx( "org.netbeans.modules.java.j2seproject.ui.customizer.J2SECustomizer" ); ! if (preselectedCategory != null && preselectedSubCategory != null) { ! for (int i=0; i 0) { - panels.put( clients, new CustomizerWSClientHost( uiProperties, serviceClientsSettings )); - } else { - panels.put( clients, new NoWebServiceClientsPanel()); - } - panelProvider = new PanelProvider( panels ); - - } - - private static class PanelProvider implements ProjectCustomizer.CategoryComponentProvider { - - private JPanel EMPTY_PANEL = new JPanel(); - - private Map /**/ panels; - - PanelProvider( Map panels ) { - this.panels = panels; - } - - public JComponent create( ProjectCustomizer.Category category ) { - JComponent panel = (JComponent)panels.get( category ); - return panel == null ? EMPTY_PANEL : panel; - } - - } - /** Listens to the actions on the Customizer's option buttons */ private class OptionListener extends WindowAdapter implements ActionListener { --- 91,119 ---- Dialog dialog = (Dialog)project2Dialog.get (project); if ( dialog != null ) { ! dialog.setVisible(true); return; } else { ! J2SEProjectProperties uiProperties = new J2SEProjectProperties( (J2SEProject)project, updateHelper, evaluator, refHelper, genFileHelper ); ! Lookup context = Lookups.fixed(new Object[] { ! project, ! uiProperties, ! new SubCategoryProvider(preselectedCategory, preselectedSubCategory) ! }); OptionListener listener = new OptionListener( project, uiProperties ); ! dialog = ProjectCustomizer.createCustomizerDialog( CUSTOMIZER_FOLDER_PATH, context, preselectedCategory, listener, null ); dialog.addWindowListener( listener ); dialog.setTitle( MessageFormat.format( NbBundle.getMessage( CustomizerProviderImpl.class, "LBL_Customizer_Title" ), // NOI18N new Object[] { ProjectUtils.getInformation(project).getDisplayName() } ) ); project2Dialog.put(project, dialog); ! dialog.setVisible(true); } } /** Listens to the actions on the Customizer's option buttons */ private class OptionListener extends WindowAdapter implements ActionListener { *************** *** 282,288 **** // Close & dispose the the dialog Dialog dialog = (Dialog)project2Dialog.get( project ); if ( dialog != null ) { ! dialog.hide(); dialog.dispose(); } } --- 134,140 ---- // Close & dispose the the dialog Dialog dialog = (Dialog)project2Dialog.get( project ); if ( dialog != null ) { ! dialog.setVisible(false); dialog.dispose(); } } *************** *** 298,311 **** //may not be called Dialog dialog = (Dialog)project2Dialog.get( project ); if ( dialog != null ) { ! dialog.hide (); dialog.dispose(); } } } ! static interface SubCategoryProvider { ! public void showSubCategory (String name); } --- 150,177 ---- //may not be called Dialog dialog = (Dialog)project2Dialog.get( project ); if ( dialog != null ) { ! dialog.setVisible(false); dialog.dispose(); } } } ! static final class SubCategoryProvider { ! ! private String subcategory; ! ! private String category; ! ! SubCategoryProvider(String category, String subcategory) { ! this.category = category; ! this.subcategory = subcategory; ! } ! public String getCategory() { ! return category; ! } ! public String getSubcategory() { ! return subcategory; ! } } Index: j2seproject/src/org/netbeans/modules/java/j2seproject/ui/resources/layer.xml =================================================================== RCS file: /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/resources/layer.xml,v retrieving revision 1.15 diff -c -r1.15 layer.xml *** j2seproject/src/org/netbeans/modules/java/j2seproject/ui/resources/layer.xml 30 Nov 2005 18:55:26 -0000 1.15 --- j2seproject/src/org/netbeans/modules/java/j2seproject/ui/resources/layer.xml 18 Apr 2006 12:21:33 -0000 *************** *** 65,68 **** --- 65,121 ---- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +