diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizard.java index 5e41788e8de..ecd95994598 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizard.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizard.java @@ -370,7 +370,7 @@ public class RSEDefaultNewConnectionWizard extends RSEAbstractNewConnectionWizar // query all affected subsystems for their list of additional wizard pages... Vector additionalPages = new Vector(); ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); - ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType.getName(), true); + ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType, true); for (int idx = 0; idx < factories.length; idx++) { ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter)factories[idx].getAdapter(ISubSystemConfigurationAdapter.class); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java index e8c15a9acf4..07ecd39c48a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEMainNewConnectionWizard.java @@ -323,6 +323,9 @@ public class RSEMainNewConnectionWizard extends Wizard implements INewWizard, IS container.updateTitleBar(); container.updateButtons(); } + + // Save the current selection to the dialog settings + saveWidgetValues(); } /* (non-Javadoc) @@ -331,7 +334,7 @@ public class RSEMainNewConnectionWizard extends Wizard implements INewWizard, IS public void addPages() { addPage(mainPage); // and restore the wizard's selection state from last session - restoreFromDialogSettings(); + restoreWidgetValues(); } /* (non-Javadoc) @@ -363,24 +366,33 @@ public class RSEMainNewConnectionWizard extends Wizard implements INewWizard, IS */ public boolean performFinish() { // Save the current selection to the dialog settings - IDialogSettings dialogSettings = getDialogSettings(); - if (dialogSettings != null && getSelection() instanceof IStructuredSelection) { - IStructuredSelection selection = (IStructuredSelection)getSelection(); - if (selection.getFirstElement() instanceof IRSESystemType) { - dialogSettings.put(LAST_SELECTED_SYSTEM_TYPE_ID, ((IRSESystemType)selection.getFirstElement()).getId()); - } - } + saveWidgetValues(); if (mainPage != null) mainPage.saveWidgetValues(); return true; } + /** + * Save the last selected system type id to the dialog settings. + * Called from onSelectedSystemTypeChanged and + * performFinish. + */ + protected void saveWidgetValues() { + IDialogSettings dialogSettings = getDialogSettings(); + if (dialogSettings != null && getSelection() instanceof IStructuredSelection) { + IStructuredSelection selection = (IStructuredSelection)getSelection(); + if (selection.getFirstElement() instanceof IRSESystemType) { + dialogSettings.put(LAST_SELECTED_SYSTEM_TYPE_ID, ((IRSESystemType)selection.getFirstElement()).getId()); + } + } + } + /** * Restore the persistent saved wizard state. This method * is called from the wizards constructor. */ - protected void restoreFromDialogSettings() { + protected void restoreWidgetValues() { IDialogSettings dialogSettings = getDialogSettings(); if (dialogSettings != null) { String systemTypeId = dialogSettings.get(LAST_SELECTED_SYSTEM_TYPE_ID);