From b0b2620fe7995b801aff2741232cbc41f9d486e7 Mon Sep 17 00:00:00 2001 From: Uwe Stieber Date: Tue, 20 Feb 2007 11:14:52 +0000 Subject: [PATCH] [fix] SystemConnectionForm not verified --- .../eclipse/rse/ui/SystemConnectionForm.java | 285 ++++++++---------- ...RSEDefaultNewConnectionWizardMainPage.java | 54 ++-- 2 files changed, 158 insertions(+), 181 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java index 9fdf03020c4..9ae654520ad 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java @@ -121,7 +121,6 @@ public class SystemConnectionForm protected boolean callerInstanceOfWizardPage, callerInstanceOfSystemPromptDialog, callerInstanceOfPropertyPage; protected boolean userIdFromSystemTypeDefault; protected boolean updateMode = false; - protected boolean initDone = false; protected boolean contentsCreated = false; protected boolean connectionNameEmpty = false; protected boolean connectionNameListen = true; @@ -609,8 +608,7 @@ public class SystemConnectionForm * @param parent The parent composite * @param updateMode true if we are in update mode versus create mode. */ - public Control createContents(Composite parent, boolean updateMode, String parentHelpId) - { + public Control createContents(Composite parent, boolean updateMode, String parentHelpId) { contentsCreated = true; Label labelSystemType = null; String temp = null; @@ -621,189 +619,168 @@ public class SystemConnectionForm SystemWidgetHelpers.setCompositeHelp(composite_prompts, parentHelpId); // Type display - if (updateMode) - { - temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_TYPE_LABEL); - labelType = SystemWidgetHelpers.createLabel(composite_prompts, temp); - labelTypeValue = SystemWidgetHelpers.createLabel( - composite_prompts, SystemResources.RESID_CONNECTION_TYPE_VALUE); + if (updateMode) { + temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_TYPE_LABEL); + labelType = SystemWidgetHelpers.createLabel(composite_prompts, temp); + labelTypeValue = SystemWidgetHelpers.createLabel(composite_prompts, SystemResources.RESID_CONNECTION_TYPE_VALUE); } - // PROFILE SELECTION - if (updateMode) - { - temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_PROFILE_LABEL); - labelProfile = SystemWidgetHelpers.createLabel(composite_prompts, temp); - labelProfile.setToolTipText(SystemResources.RESID_CONNECTION_PROFILE_READONLY_TIP); - labelProfileValue = SystemWidgetHelpers.createLabel(composite_prompts, ""); //$NON-NLS-1$ - labelProfileValue.setToolTipText(SystemResources.RESID_CONNECTION_PROFILE_READONLY_TIP); - } - else //if (!updateMode) - { - temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_PROFILE_LABEL); - labelProfile = SystemWidgetHelpers.createLabel(composite_prompts, temp); - labelProfile.setToolTipText(SystemResources.RESID_CONNECTION_PROFILE_TIP); - if (!updateMode) - { - profileCombo = SystemWidgetHelpers.createReadonlyCombo( - composite_prompts,null,SystemResources.RESID_CONNECTION_PROFILE_TIP); - if (defaultProfileNames != null) profileCombo.setItems(defaultProfileNames); - if (defaultProfile != null) setProfileNamePreSelection(defaultProfile); - SystemWidgetHelpers.setHelp(profileCombo, RSEUIPlugin.HELPPREFIX + "ccon0001"); //$NON-NLS-1$ - } - } - - if (!updateMode) - SystemWidgetHelpers.createLabel(composite_prompts, " ", 2); // filler //$NON-NLS-1$ + // PROFILE SELECTION + if (updateMode) { + temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_PROFILE_LABEL); + labelProfile = SystemWidgetHelpers.createLabel(composite_prompts, temp); + labelProfile.setToolTipText(SystemResources.RESID_CONNECTION_PROFILE_READONLY_TIP); + labelProfileValue = SystemWidgetHelpers.createLabel(composite_prompts, ""); //$NON-NLS-1$ + labelProfileValue.setToolTipText(SystemResources.RESID_CONNECTION_PROFILE_READONLY_TIP); + } else // if (!updateMode) + { + temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_PROFILE_LABEL); + labelProfile = SystemWidgetHelpers.createLabel(composite_prompts, temp); + labelProfile.setToolTipText(SystemResources.RESID_CONNECTION_PROFILE_TIP); + if (!updateMode) { + profileCombo = SystemWidgetHelpers.createReadonlyCombo(composite_prompts, null, SystemResources.RESID_CONNECTION_PROFILE_TIP); + SystemWidgetHelpers.setHelp(profileCombo, RSEUIPlugin.HELPPREFIX + "ccon0001"); //$NON-NLS-1$ + } + } + + if (!updateMode) + SystemWidgetHelpers.createLabel(composite_prompts, " ", 2); // filler //$NON-NLS-1$ // SYSTEMTYPE PROMPT IN UPDATE MODE OR RESTRICTED MODE - if (updateMode || ((restrictSystemTypesTo != null) && (restrictSystemTypesTo.length==1)) ) - { - if (updateMode) - { - temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_SYSTEMTYPE_LABEL); - labelSystemType = SystemWidgetHelpers.createLabel(composite_prompts, temp); - labelSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_READONLY_TIP); - textSystemTypeReadOnly = SystemWidgetHelpers.createLabel(composite_prompts,""); //$NON-NLS-1$ - textSystemTypeReadOnly.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_READONLY_TIP); - } - else - singleTypeMode = true; - } - - if (updateMode) - SystemWidgetHelpers.createLabel(composite_prompts, " ", nbrColumns); // filler //$NON-NLS-1$ + if (updateMode || ((restrictSystemTypesTo != null) && (restrictSystemTypesTo.length == 1))) { + if (updateMode) { + temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_SYSTEMTYPE_LABEL); + labelSystemType = SystemWidgetHelpers.createLabel(composite_prompts, temp); + labelSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_READONLY_TIP); + textSystemTypeReadOnly = SystemWidgetHelpers.createLabel(composite_prompts, ""); //$NON-NLS-1$ + textSystemTypeReadOnly.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_READONLY_TIP); + } else + singleTypeMode = true; + } + + if (updateMode) + SystemWidgetHelpers.createLabel(composite_prompts, " ", nbrColumns); // filler //$NON-NLS-1$ // CONNECTION NAME PROMPT - temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_CONNECTIONNAME_LABEL); - labelConnectionName = SystemWidgetHelpers.createLabel(composite_prompts, temp); - labelConnectionName.setToolTipText(SystemResources.RESID_CONNECTION_CONNECTIONNAME_TIP); - textConnectionName = SystemWidgetHelpers.createTextField( - composite_prompts,null,SystemResources.RESID_CONNECTION_CONNECTIONNAME_TIP); - SystemWidgetHelpers.setHelp(textConnectionName, RSEUIPlugin.HELPPREFIX + "ccon0002"); //$NON-NLS-1$ + temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_CONNECTIONNAME_LABEL); + labelConnectionName = SystemWidgetHelpers.createLabel(composite_prompts, temp); + labelConnectionName.setToolTipText(SystemResources.RESID_CONNECTION_CONNECTIONNAME_TIP); + textConnectionName = SystemWidgetHelpers.createTextField(composite_prompts, null, SystemResources.RESID_CONNECTION_CONNECTIONNAME_TIP); + SystemWidgetHelpers.setHelp(textConnectionName, RSEUIPlugin.HELPPREFIX + "ccon0002"); //$NON-NLS-1$ // SYSTEMTYPE PROMPT IN CREATE MODE - //if (!updateMode) - if ((labelSystemType == null) && !singleTypeMode) - { - temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_SYSTEMTYPE_LABEL); - labelSystemType = SystemWidgetHelpers.createLabel(composite_prompts, temp); - labelSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP); - textSystemType = SystemWidgetHelpers.createSystemTypeCombo(composite_prompts,null,restrictSystemTypesTo); - textSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP); - SystemWidgetHelpers.setHelp(textSystemType, RSEUIPlugin.HELPPREFIX + "ccon0003"); //$NON-NLS-1$ - } + // if (!updateMode) + if ((labelSystemType == null) && !singleTypeMode) { + temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_SYSTEMTYPE_LABEL); + labelSystemType = SystemWidgetHelpers.createLabel(composite_prompts, temp); + labelSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP); + textSystemType = SystemWidgetHelpers.createSystemTypeCombo(composite_prompts, null, restrictSystemTypesTo); + textSystemType.setToolTipText(SystemResources.RESID_CONNECTION_SYSTEMTYPE_TIP); + SystemWidgetHelpers.setHelp(textSystemType, RSEUIPlugin.HELPPREFIX + "ccon0003"); //$NON-NLS-1$ + } // HOSTNAME PROMPT - temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_HOSTNAME_LABEL); + temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_HOSTNAME_LABEL); labelHostName = SystemWidgetHelpers.createLabel(composite_prompts, temp); - labelHostName.setToolTipText(SystemResources.RESID_CONNECTION_HOSTNAME_TIP); - - if (!updateMode && (defaultSystemType==null)) - { - defaultSystemType = RSEPreferencesManager.getSystemType(); - if ((defaultSystemType == null) || (defaultSystemType.length() == 0)) - defaultSystemType = lastSystemType; - if ((defaultSystemType == null) || (defaultSystemType.length() == 0)) - defaultSystemType = textSystemType.getItem(0); - } - - textHostName = SystemWidgetHelpers.createHostNameCombo(composite_prompts,null,defaultSystemType); - textHostName.setToolTipText(SystemResources.RESID_CONNECTION_HOSTNAME_TIP); - SystemWidgetHelpers.setHelp(textHostName, RSEUIPlugin.HELPPREFIX + "ccon0004"); //$NON-NLS-1$ - + labelHostName.setToolTipText(SystemResources.RESID_CONNECTION_HOSTNAME_TIP); + + if (!updateMode && (defaultSystemType == null)) { + defaultSystemType = RSEPreferencesManager.getSystemType(); + if ((defaultSystemType == null) || (defaultSystemType.length() == 0)) + defaultSystemType = lastSystemType; + if ((defaultSystemType == null) || (defaultSystemType.length() == 0)) + defaultSystemType = textSystemType.getItem(0); + } + + textHostName = SystemWidgetHelpers.createHostNameCombo(composite_prompts, null, defaultSystemType); + textHostName.setToolTipText(SystemResources.RESID_CONNECTION_HOSTNAME_TIP); + SystemWidgetHelpers.setHelp(textHostName, RSEUIPlugin.HELPPREFIX + "ccon0004"); //$NON-NLS-1$ + // USERID PROMPT - /* We are testing the usability of not prompting for the user ID, so that the - * user has less to think about when creating a new connection. Phil. + /* + * We are testing the usability of not prompting for the user ID, so that the user has less to think about when + * creating a new connection. Phil. */ if (updateMode) // added for this experiment { temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_DEFAULTUSERID_LABEL); - labelUserId = SystemWidgetHelpers.createLabel(composite_prompts, temp); - labelUserId.setToolTipText(SystemResources.RESID_CONNECTION_DEFAULTUSERID_TIP); - textUserId = SystemWidgetHelpers.createInheritableTextField( - composite_prompts,SystemResources.RESID_CONNECTION_DEFAULTUSERID_INHERITBUTTON_TIP,SystemResources.RESID_CONNECTION_DEFAULTUSERID_TIP); - SystemWidgetHelpers.setHelp(textUserId, RSEUIPlugin.HELPPREFIX + "ccon0005"); //$NON-NLS-1$ + labelUserId = SystemWidgetHelpers.createLabel(composite_prompts, temp); + labelUserId.setToolTipText(SystemResources.RESID_CONNECTION_DEFAULTUSERID_TIP); + textUserId = SystemWidgetHelpers.createInheritableTextField(composite_prompts, SystemResources.RESID_CONNECTION_DEFAULTUSERID_INHERITBUTTON_TIP, + SystemResources.RESID_CONNECTION_DEFAULTUSERID_TIP); + SystemWidgetHelpers.setHelp(textUserId, RSEUIPlugin.HELPPREFIX + "ccon0005"); //$NON-NLS-1$ } // DESCRIPTION PROMPT temp = SystemWidgetHelpers.appendColon(SystemResources.RESID_CONNECTION_DESCRIPTION_LABEL); labelDescription = SystemWidgetHelpers.createLabel(composite_prompts, temp); - labelDescription.setToolTipText(SystemResources.RESID_CONNECTION_DESCRIPTION_TIP); - textDescription = SystemWidgetHelpers.createTextField( - composite_prompts,null,SystemResources.RESID_CONNECTION_DESCRIPTION_TIP); - SystemWidgetHelpers.setHelp(textDescription, RSEUIPlugin.HELPPREFIX + "ccon0006"); //$NON-NLS-1$ + labelDescription.setToolTipText(SystemResources.RESID_CONNECTION_DESCRIPTION_TIP); + textDescription = SystemWidgetHelpers.createTextField(composite_prompts, null, SystemResources.RESID_CONNECTION_DESCRIPTION_TIP); + SystemWidgetHelpers.setHelp(textDescription, RSEUIPlugin.HELPPREFIX + "ccon0006"); //$NON-NLS-1$ // VERIFY HOST NAME CHECKBOX - SystemWidgetHelpers.createLabel(composite_prompts, " ", nbrColumns); // filler //$NON-NLS-1$ - verifyHostNameCB = SystemWidgetHelpers.createCheckBox(composite_prompts, nbrColumns, null, SystemResources.RESID_CONNECTION_VERIFYHOSTNAME_LABEL, SystemResources.RESID_CONNECTION_VERIFYHOSTNAME_TOOLTIP); - if (updateMode) - verifyHostNameCB.setSelection(false); - else - verifyHostNameCB.setSelection(SystemPreferencesManager.getVerifyConnection()); - - // yantzi: artemis 6.0, work offline - if (enableOfflineCB()) - { - workOfflineCB = SystemWidgetHelpers.createCheckBox(composite_prompts, nbrColumns, null, SystemResources.RESID_OFFLINE_WORKOFFLINE_LABEL, SystemResources.RESID_OFFLINE_WORKOFFLINE_TOOLTIP); - SystemWidgetHelpers.setHelp(workOfflineCB, RSEUIPlugin.HELPPREFIX + "wofp0000"); //$NON-NLS-1$ - } + SystemWidgetHelpers.createLabel(composite_prompts, " ", nbrColumns); // filler //$NON-NLS-1$ + verifyHostNameCB = SystemWidgetHelpers.createCheckBox(composite_prompts, nbrColumns, null, SystemResources.RESID_CONNECTION_VERIFYHOSTNAME_LABEL, + SystemResources.RESID_CONNECTION_VERIFYHOSTNAME_TOOLTIP); + if (updateMode) + verifyHostNameCB.setSelection(false); + else + verifyHostNameCB.setSelection(SystemPreferencesManager.getVerifyConnection()); - if (!initDone) - doInitializeFields(); - - connectionNameEmpty = (textConnectionName.getText().trim().length() == 0); // d43191 + // yantzi: artemis 6.0, work offline + if (enableOfflineCB()) { + workOfflineCB = SystemWidgetHelpers.createCheckBox(composite_prompts, nbrColumns, null, SystemResources.RESID_OFFLINE_WORKOFFLINE_LABEL, + SystemResources.RESID_OFFLINE_WORKOFFLINE_TOOLTIP); + SystemWidgetHelpers.setHelp(workOfflineCB, RSEUIPlugin.HELPPREFIX + "wofp0000"); //$NON-NLS-1$ + } + + + connectionNameEmpty = (textConnectionName.getText().trim().length() == 0); // d43191 textConnectionName.setFocus(); - - + // add keystroke listeners... - textConnectionName.addModifyListener( - new ModifyListener() { - public void modifyText(ModifyEvent e) { - validateConnectionNameInput(true); - } + textConnectionName.addModifyListener(new ModifyListener() { + public void modifyText(ModifyEvent e) { + validateConnectionNameInput(true); } - ); - textHostName.addModifyListener( - new ModifyListener() { - public void modifyText(ModifyEvent e) { - validateHostNameInput(); - validateConnectionNameInput(false); - } + }); + textHostName.addModifyListener(new ModifyListener() { + public void modifyText(ModifyEvent e) { + validateHostNameInput(); + validateConnectionNameInput(false); } - ); - if (textUserId!=null) - textUserId.addModifyListener( - new ModifyListener() - { - public void modifyText(ModifyEvent e) - { + }); + if (textUserId != null) + textUserId.addModifyListener(new ModifyListener() { + public void modifyText(ModifyEvent e) { validateUserIdInput(); } }); - - if (profileCombo != null) { - profileCombo.addSelectionListener(this); - } - - if (textSystemType != null) { - originalHostName = textHostName.getText(); - textSystemType.addSelectionListener(this); - } - - if (verifyHostNameCB != null) { - verifyHostNameCB.addSelectionListener(this); - } - if ((textSystemType!=null) && (textSystemType.getText()!=null)) - caller.systemTypeSelected(textSystemType.getText(), true); - else if ((restrictSystemTypesTo!=null) && (restrictSystemTypesTo.length==1)) - caller.systemTypeSelected(restrictSystemTypesTo[0], true); - - if (textUserId == null) - userIdLocation = IRSEUserIdConstants.USERID_LOCATION_NOTSET; - + if (profileCombo != null) { + profileCombo.addSelectionListener(this); + } + + if (textSystemType != null) { + originalHostName = textHostName.getText(); + textSystemType.addSelectionListener(this); + } + + if (verifyHostNameCB != null) { + verifyHostNameCB.addSelectionListener(this); + } + + if ((textSystemType != null) && (textSystemType.getText() != null)) + caller.systemTypeSelected(textSystemType.getText(), true); + else if ((restrictSystemTypesTo != null) && (restrictSystemTypesTo.length == 1)) + caller.systemTypeSelected(restrictSystemTypesTo[0], true); + + if (textUserId == null) + userIdLocation = IRSEUserIdConstants.USERID_LOCATION_NOTSET; + + doInitializeFields(); + return composite_prompts; // composite; } @@ -1050,7 +1027,7 @@ public class SystemConnectionForm workOfflineCB.setSelection(defaultWorkOffline); } - initDone = true; + verify(false); } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizardMainPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizardMainPage.java index 5e2920d77e4..4c7bb934aa3 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizardMainPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/newconnection/RSEDefaultNewConnectionWizardMainPage.java @@ -42,9 +42,9 @@ import org.eclipse.swt.widgets.Control; public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardPage implements ISystemConnectionFormCaller { - protected String[] restrictSystemTypesTo; - protected final SystemConnectionForm form; - protected String parentHelpId; + private String[] restrictSystemTypesTo; + private SystemConnectionForm form; + private String parentHelpId; /** * Constructor. Use this when you want to supply your own title and @@ -55,7 +55,6 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP parentHelpId = RSEUIPlugin.HELPPREFIX + "wncc0000"; //$NON-NLS-1$ setHelp(parentHelpId); - form = new SystemConnectionForm(this, this); } /** @@ -66,7 +65,7 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP public void restrictSystemType(String systemType) { assert systemType != null; restrictSystemTypesTo = new String[] { systemType }; - form.restrictSystemTypes(restrictSystemTypesTo); + getForm().restrictSystemTypes(restrictSystemTypesTo); } /** @@ -76,6 +75,7 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP * @see org.eclipse.rse.ui.SystemConnectionForm */ public SystemConnectionForm getForm() { + if (form == null) form = new SystemConnectionForm(this, this); return form; } @@ -83,21 +83,21 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP * Call this to specify a validator for the connection name. It will be called per keystroke. */ public void setConnectionNameValidators(ISystemValidator[] v) { - form.setConnectionNameValidators(v); + getForm().setConnectionNameValidators(v); } /** * Call this to specify a validator for the hostname. It will be called per keystroke. */ public void setHostNameValidator(ISystemValidator v) { - form.setHostNameValidator(v); + getForm().setHostNameValidator(v); } /** * Call this to specify a validator for the userId. It will be called per keystroke. */ public void setUserIdValidator(ISystemValidator v) { - form.setUserIdValidator(v); + getForm().setUserIdValidator(v); } /** @@ -106,42 +106,42 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP * it and set it here by calling this. */ public void setUserId(String userId) { - form.setUserId(userId); + getForm().setUserId(userId); } /** * Set the profile names to show in the combo */ public void setProfileNames(String[] names) { - form.setProfileNames(names); + getForm().setProfileNames(names); } /** * Set the profile name to preselect */ public void setProfileNamePreSelection(String name) { - form.setProfileNamePreSelection(name); + getForm().setProfileNamePreSelection(name); } /** * Set the currently selected connection so as to better initialize input fields */ public void setCurrentlySelectedConnection(IHost connection) { - form.setCurrentlySelectedConnection(connection); + getForm().setCurrentlySelectedConnection(connection); } /** * Preset the connection name */ public void setConnectionName(String name) { - form.setConnectionName(name); + getForm().setConnectionName(name); } /** * Preset the host name */ public void setHostName(String name) { - form.setHostName(name); + getForm().setHostName(name); } /** @@ -150,7 +150,7 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP * to the caller (JFace). This is used as the contents of this page. */ public Control createContents(Composite parent) { - return form.createContents(parent, SystemConnectionForm.CREATE_MODE, parentHelpId); + return getForm().createContents(parent, SystemConnectionForm.CREATE_MODE, parentHelpId); } /** @@ -158,7 +158,7 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP * Override from parent. Return control to be given initial focus. */ protected Control getInitialFocusControl() { - return form.getInitialFocusControl(); + return getForm().getInitialFocusControl(); } /** @@ -170,7 +170,7 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP * @return whether the wizard finished successfully */ public boolean performFinish() { - return form.verify(true); + return getForm().verify(true); } // --------------------------------- // @@ -182,7 +182,7 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP * Call this after finish ends successfully. */ public String getConnectionName() { - return form.getConnectionName(); + return getForm().getConnectionName(); } /** @@ -190,7 +190,7 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP * Call this after finish ends successfully. */ public String getHostName() { - return form.getHostName(); + return getForm().getHostName(); } /** @@ -198,7 +198,7 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP * Call this after finish ends successfully. */ public String getDefaultUserId() { - return form.getDefaultUserId(); + return getForm().getDefaultUserId(); } /** @@ -206,7 +206,7 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP * @see org.eclipse.rse.core.IRSEUserIdConstants */ public int getDefaultUserIdLocation() { - return form.getUserIdLocation(); + return getForm().getUserIdLocation(); } /** @@ -214,7 +214,7 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP * Call this after finish ends successfully. */ public String getConnectionDescription() { - return form.getConnectionDescription(); + return getForm().getConnectionDescription(); } /** @@ -222,7 +222,7 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP * Call this after finish ends successfully. */ public String getProfileName() { - return form.getProfileName(); + return getForm().getProfileName(); } @@ -232,8 +232,8 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP */ public boolean isPageComplete() { //System.out.println("Inside isPageComplete. " + form.isPageComplete()); - if (form != null) - return form.isPageComplete() && form.isConnectionUnique(); + if (getForm() != null) + return getForm().isPageComplete() && getForm().isConnectionUnique(); else return false; } @@ -249,7 +249,7 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP // verify contents of page before going to main page // this is done because the main page may have input that is not valid, but can // only be verified when next is pressed since it requires a long running operation - boolean verify = form.verify(true); + boolean verify = getForm().verify(true); if (!verify) { return null; @@ -271,7 +271,7 @@ public class RSEDefaultNewConnectionWizardMainPage extends AbstractSystemWizardP RSEDefaultNewConnectionWizard newConnWizard = getWizard() instanceof RSEDefaultNewConnectionWizard ? (RSEDefaultNewConnectionWizard)getWizard() : null; if (newConnWizard != null) { - return (isPageComplete() && newConnWizard.hasAdditionalPages() && form.isConnectionUnique()); + return (isPageComplete() && newConnWizard.hasAdditionalPages() && getForm().isConnectionUnique()); } else return super.canFlipToNextPage(); }