plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ServerPluginManagerWizard.java [110:180]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void nextPressed () {
        switch (pageVisible) {
            case 0:
                if (installPlugin.getSelection() == true) {
                    page4.populateTable(pluginManager.readPluginList(localRepoPath.getText()));
                    page1.setPageComplete(true);
                    page2.setPageComplete(true);
                    page3.setPageComplete(true);
                    page5.setPageComplete(false);
                    pageVisible = 4;
                } else {
                    // refresh the list of available plugins
                    page1.refreshPluginList();
                    page1.setPageComplete(false);
                    page5.setPageComplete(true);
                    pageVisible = 1;
                }
                break;
            case 1:
                try {
                    metadata = pluginManager.getPluginMetadata(createPluginCombo.getItem(createPluginCombo.getSelectionIndex()));
                    page2.loadMetadata (metadata);
                }
                catch (Exception e) {
                    e.printStackTrace();
                }
                pageVisible++;
                break;
            case 2:
                try {
                    page3.loadMetadata (metadata);
                }
                catch (Exception e) {
                    e.printStackTrace();
                }
                pageVisible++;
                break;
            case 3:
                boolean success = true;
                try {
                    metadata = page2.getMetadata();
                    metadata = page3.getMetadata(metadata);
                    pluginManager.savePluginXML (createPluginCombo.getItem(createPluginCombo.getSelectionIndex()), metadata);
                    // create the plugin in the proper directory
                    pluginManager.exportCAR (localRepoPath.getText(), createPluginCombo.getItem(createPluginCombo.getSelectionIndex()));
                    // update the plugin list that's in the base path
                    pluginManager.updatePluginList (localRepoPath.getText(), metadata);
                }
                catch (Exception e) {
                    pluginCreatedStatus.setText(CommonMessages.bind(CommonMessages.failedToSave, createPluginCombo.getItem(createPluginCombo.getSelectionIndex())));
                    Device device = pluginCreatedStatus.getForeground().getDevice();
                    Color color = new Color (device, 255, 0, 0);
                    pluginCreatedStatus.setForeground(color);
                    success = false;
                }
                if (success == true) {
                    pluginCreatedStatus.setText(CommonMessages.bind (CommonMessages.savedSuccess, createPluginCombo.getItem(createPluginCombo.getSelectionIndex())));
                    Device device = pluginCreatedStatus.getForeground().getDevice();
                    Color color = new Color (device, 0, 0, 0);
                    pluginCreatedStatus.setForeground(color);
                }
                pageVisible = 0;
                break;
            case 4:
                ArrayList<String> eventList = page4.installPlugins();
                page5.setEventList (eventList);
                page5.setPageComplete(true);
                pageVisible++;
                break;
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/ServerPluginManagerWizard.java [110:180]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void nextPressed () {
        switch (pageVisible) {
            case 0:
                if (installPlugin.getSelection() == true) {
                    page4.populateTable(pluginManager.readPluginList(localRepoPath.getText()));
                    page1.setPageComplete(true);
                    page2.setPageComplete(true);
                    page3.setPageComplete(true);
                    page5.setPageComplete(false);
                    pageVisible = 4;
                } else {
                    // refresh the list of available plugins
                    page1.refreshPluginList();
                    page1.setPageComplete(false);
                    page5.setPageComplete(true);
                    pageVisible = 1;
                }
                break;
            case 1:
                try {
                    metadata = pluginManager.getPluginMetadata(createPluginCombo.getItem(createPluginCombo.getSelectionIndex()));
                    page2.loadMetadata (metadata);
                }
                catch (Exception e) {
                    e.printStackTrace();
                }
                pageVisible++;
                break;
            case 2:
                try {
                    page3.loadMetadata (metadata);
                }
                catch (Exception e) {
                    e.printStackTrace();
                }
                pageVisible++;
                break;
            case 3:
                boolean success = true;
                try {
                    metadata = page2.getMetadata();
                    metadata = page3.getMetadata(metadata);
                    pluginManager.savePluginXML (createPluginCombo.getItem(createPluginCombo.getSelectionIndex()), metadata);
                    // create the plugin in the proper directory
                    pluginManager.exportCAR (localRepoPath.getText(), createPluginCombo.getItem(createPluginCombo.getSelectionIndex()));
                    // update the plugin list that's in the base path
                    pluginManager.updatePluginList (localRepoPath.getText(), metadata);
                }
                catch (Exception e) {
                    pluginCreatedStatus.setText(CommonMessages.bind(CommonMessages.failedToSave, createPluginCombo.getItem(createPluginCombo.getSelectionIndex())));
                    Device device = pluginCreatedStatus.getForeground().getDevice();
                    Color color = new Color (device, 255, 0, 0);
                    pluginCreatedStatus.setForeground(color);
                    success = false;
                }
                if (success == true) {
                    pluginCreatedStatus.setText(CommonMessages.bind (CommonMessages.savedSuccess, createPluginCombo.getItem(createPluginCombo.getSelectionIndex())));
                    Device device = pluginCreatedStatus.getForeground().getDevice();
                    Color color = new Color (device, 0, 0, 0);
                    pluginCreatedStatus.setForeground(color);
                }
                pageVisible = 0;
                break;
            case 4:
                ArrayList<String> eventList = page4.installPlugins();
                page5.setEventList (eventList);
                page5.setPageComplete(true);
                pageVisible++;
                break;
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



