From 6b04348c73a0baf79bc09e22d0904c3c63c9f06c Mon Sep 17 00:00:00 2001 From: Kushal Munir < kmunir@ca.ibm.com> Date: Tue, 13 Feb 2007 03:51:32 +0000 Subject: [PATCH] [150112]: Remove dead code. Classes SystemNewConnectionWizard, SystemNewConnectionWizardDefaultMainPage and SystemNewConnectionWizardRenameProfilePage have been deleted. --- ...RSEDefaultNewConnectionWizardDelegate.java | 3 +- .../ui/wizards/SystemNewConnectionWizard.java | 520 ------------------ ...temNewConnectionWizardDefaultMainPage.java | 355 ------------ ...mNewConnectionWizardRenameProfilePage.java | 158 ------ 4 files changed, 1 insertion(+), 1035 deletions(-) delete mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizard.java delete mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizardDefaultMainPage.java delete mode 100644 rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizardRenameProfilePage.java diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDefaultNewConnectionWizardDelegate.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDefaultNewConnectionWizardDelegate.java index e709e3cb28b..37b2466dca1 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDefaultNewConnectionWizardDelegate.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/RSEDefaultNewConnectionWizardDelegate.java @@ -47,7 +47,6 @@ import org.eclipse.rse.ui.view.SystemPerspectiveHelpers; public class RSEDefaultNewConnectionWizardDelegate extends RSENewConnectionWizardDelegate { private RSENewConnectionWizardDefaultDelegateMainPage mainPage; - private SystemNewConnectionWizardRenameProfilePage rnmProfilePage; private ISystemNewConnectionWizardPage[] subsystemFactorySuppliedWizardPages; private Hashtable ssfWizardPagesPerSystemType = new Hashtable(); private String defaultUserId; @@ -500,7 +499,7 @@ public class RSEDefaultNewConnectionWizardDelegate extends RSENewConnectionWizar */ public IWizardPage getNextPage(IWizardPage page) { - if (!hasAdditionalPages() || (page==rnmProfilePage)) + if (!hasAdditionalPages()) return null; else { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizard.java deleted file mode 100644 index 927a8182c73..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizard.java +++ /dev/null @@ -1,520 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2000, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.ui.wizards; -import java.util.Hashtable; -import java.util.Vector; - -import org.eclipse.jface.wizard.IWizardPage; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.rse.core.IRSESystemType; -import org.eclipse.rse.core.SystemBasePlugin; -import org.eclipse.rse.core.model.IHost; -import org.eclipse.rse.core.model.ISystemNewConnectionWizardPage; -import org.eclipse.rse.core.model.ISystemProfile; -import org.eclipse.rse.core.model.ISystemRegistry; -import org.eclipse.rse.core.subsystems.ISubSystem; -import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; -import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter; -import org.eclipse.rse.model.DummyHost; -import org.eclipse.rse.model.SystemStartHere; -import org.eclipse.rse.services.clientserver.messages.SystemMessage; -import org.eclipse.rse.services.clientserver.messages.SystemMessageException; -import org.eclipse.rse.ui.ISystemIconConstants; -import org.eclipse.rse.ui.ISystemPreferencesConstants; -import org.eclipse.rse.ui.RSEUIPlugin; -import org.eclipse.rse.ui.SystemConnectionForm; -import org.eclipse.rse.ui.SystemResources; -import org.eclipse.rse.ui.messages.SystemMessageDialog; -import org.eclipse.rse.ui.view.SystemPerspectiveHelpers; -import org.eclipse.ui.INewWizard; - -/** - * Wizard for creating a new remote systems connection. - */ -public class SystemNewConnectionWizard - extends AbstractSystemWizard implements INewWizard - -{ - - private ISystemNewConnectionWizardMainPage mainPage; - private SystemNewConnectionWizardRenameProfilePage rnmProfilePage; - private ISystemNewConnectionWizardPage[] subsystemFactorySuppliedWizardPages; - private Hashtable ssfWizardPagesPerSystemType = new Hashtable(); - private String defaultUserId; - private String defaultConnectionName; - private String defaultHostName; - private String[] activeProfileNames = null; - private int privateProfileIndex = -1; - private ISystemProfile privateProfile = null; - private IHost currentlySelectedConnection = null; - private String[] restrictSystemTypesTo; - private static String lastProfile = null; - private IHost _dummyHost; - - /** - * Constructor - */ - public SystemNewConnectionWizard() - { - super(SystemResources.RESID_NEWCONN_TITLE, - RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWCONNECTIONWIZARD_ID)); - activeProfileNames = SystemStartHere.getSystemProfileManager().getActiveSystemProfileNames(); - super.setForcePreviousAndNextButtons(true); - super.setNeedsProgressMonitor(true); - } - - /** - * Call this to restrict the system type that the user is allowed to choose - */ - public void restrictSystemType(String systemType) - { - restrictSystemTypesTo = new String[1]; - restrictSystemTypesTo[0] = systemType; - if (mainPage != null) - mainPage.restrictSystemTypes(restrictSystemTypesTo); - } - /** - * Call this to restrict the system types that the user is allowed to choose - */ - public void restrictSystemTypes(String[] systemTypes) - { - this.restrictSystemTypesTo = systemTypes; - if (mainPage != null) - mainPage.restrictSystemTypes(systemTypes); - } - - public IHost getDummyHost() - { - if (_dummyHost == null) - { - _dummyHost = new DummyHost(mainPage.getHostName(), mainPage.getSystemType()); - } - return _dummyHost; - } - - /** - * Creates the wizard pages. - * This method is an override from the parent Wizard class. - */ - public void addPages() - { - try { - mainPage = createMainPage(restrictSystemTypesTo); - mainPage.setConnectionNameValidators(SystemConnectionForm.getConnectionNameValidators()); - mainPage.setCurrentlySelectedConnection(currentlySelectedConnection); - if (defaultUserId != null) - mainPage.setUserId(defaultUserId); - if (defaultConnectionName != null) - mainPage.setConnectionName(defaultConnectionName); - if (defaultHostName != null) - mainPage.setHostName(defaultHostName); - - if (restrictSystemTypesTo != null) - mainPage.restrictSystemTypes(restrictSystemTypesTo); - - SystemStartHere.getSystemProfileManager().getDefaultPrivateSystemProfile(); - - /* DKM - I don't think we should force profiles into the faces of users - * we no longer default to "private" so hopefully this would never be - * desirable - * - // if there is a default private profile, we might want to show the rename profile page - if (defaultProfile != null) - { - // make private profile equal to default profile - privateProfile = defaultProfile; - - // get the private profile index in the list of active profiles - for (int idx=0; (privateProfileIndex<0) && (idx0)) - lastProfile = activeProfileNames[0]; - } - if (lastProfile != null) - mainPage.setProfileNamePreSelection(lastProfile); - } - } - - addPage((WizardPage)mainPage); - - } catch (Exception exc) - { - SystemBasePlugin.logError("New connection: Error in createPages: ",exc); //$NON-NLS-1$ - } - } - - /** - * Creates the wizard's main page. - * This method is an override from the parent class. - */ - protected ISystemNewConnectionWizardMainPage createMainPage(String[] restrictSystemTypesTo) - { - String pageTitle = null; - if ((restrictSystemTypesTo==null) || (restrictSystemTypesTo.length != 1)) - pageTitle = SystemResources.RESID_NEWCONN_PAGE1_TITLE; - else - { - String onlySystemType = restrictSystemTypesTo[0]; - if (onlySystemType.equals(IRSESystemType.SYSTEMTYPE_LOCAL)) - pageTitle =SystemResources.RESID_NEWCONN_PAGE1_LOCAL_TITLE; - else - { - pageTitle =SystemResources.RESID_NEWCONN_PAGE1_REMOTE_TITLE; - pageTitle = SystemMessage.sub(pageTitle, "&1", onlySystemType); //$NON-NLS-1$ - } - } - mainPage = new SystemNewConnectionWizardDefaultMainPage(this, - pageTitle, - SystemResources.RESID_NEWCONN_PAGE1_DESCRIPTION); - setOutputObject(null); - return mainPage; - } - /** - * Set the currently selected connection. Used to better default entry fields. - */ - public void setCurrentlySelectedConnection(IHost conn) - { - this.currentlySelectedConnection = conn; - } - - /** - * For "new" mode, allows setting of the initial user Id. Sometimes subsystems - * like to have their own default userId preference page option. If so, query - * it and set it here by calling this. - */ - public void setUserId(String userId) - { - defaultUserId = userId; - if (mainPage != null) - mainPage.setUserId(userId); - } - - /** - * Preset the connection name - */ - public void setConnectionName(String name) - { - defaultConnectionName = name; - if (mainPage != null) - mainPage.setConnectionName(name); - } - /** - * Preset the host name - */ - public void setHostName(String name) - { - defaultHostName = name; - if (mainPage != null) - mainPage.setHostName(name); - } - - /** - * Completes processing of the wizard. If this - * method returns true, the wizard will close; - * otherwise, it will stay active. - * This method is an override from the parent Wizard class. - * - * @return whether the wizard finished successfully - */ - public boolean performFinish() - { - boolean ok = mainPage.performFinish(); - if (!ok) - setPageError((IWizardPage)mainPage); - else if (ok && hasAdditionalPages()) - { - for (int idx=0; ok && (idx0))// might be in product that doesn't have iSeries plugins - sr.expandSubSystem(objSubSystems[0]); - else - sr.expandHost(conn); - } - else - sr.expandHost(conn); - } - - lastProfile = mainPage.getProfileName(); - setOutputObject(conn); - } catch (Exception exc) - { - if (cursorSet) - setBusyCursor(false); - cursorSet = false; - String msg = "Exception creating connection "; //$NON-NLS-1$ - SystemBasePlugin.logError(msg, exc); - SystemMessageDialog.displayExceptionMessage(getShell(),exc); - ok = false; - } - } - //getShell().setCursor(null); - //busyCursor.dispose(); - if (cursorSet) - setBusyCursor(false); - return ok; - } - return ok; - } - - // callbacks from rename page - - /** - * Set the new profile name specified on the rename profile page... - */ - protected void setNewPrivateProfileName(String newName) - { - activeProfileNames[privateProfileIndex] = newName; - if (mainPage != null) - { - mainPage.setProfileNames(activeProfileNames); - mainPage.setProfileNamePreSelection(newName); - } - } - - /** - * Return the main page of this wizard - */ - public ISystemNewConnectionWizardMainPage getMainPage() - { - return mainPage; - } - /** - * Return the form of the main page of this wizard - */ - public SystemConnectionForm getMainPageForm() - { - return ((SystemNewConnectionWizardDefaultMainPage)mainPage).getForm(); - } - - // ---------------------------------------- - // CALLBACKS FROM SYSTEM CONNECTION PAGE... - // ---------------------------------------- - /** - * Event: the user has selected a system type. - */ - public void systemTypeSelected(String systemType, boolean duringInitialization) - { - subsystemFactorySuppliedWizardPages = getAdditionalWizardPages(systemType); - if (!duringInitialization) - getContainer().updateButtons(); - } - - /* - * Private method to get all the wizard pages from all the subsystem factories, given a - * system type. - */ - protected ISystemNewConnectionWizardPage[] getAdditionalWizardPages(String systemType) - { - // this query is expensive, so only do it once... - subsystemFactorySuppliedWizardPages = (ISystemNewConnectionWizardPage[])ssfWizardPagesPerSystemType.get(systemType); - if (subsystemFactorySuppliedWizardPages == null) - { - // query all affected subsystems for their list of additional wizard pages... - Vector additionalPages = new Vector(); - ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); - ISubSystemConfiguration[] factories = sr.getSubSystemConfigurationsBySystemType(systemType, true); - for (int idx=0; idx0); - } - - /** - * Return the first additional page to show when user presses Next on the main page - */ - protected IWizardPage getFirstAdditionalPage() - { - if ((subsystemFactorySuppliedWizardPages != null) && (subsystemFactorySuppliedWizardPages.length>0)) - { - IWizardPage previousPage = (IWizardPage)mainPage; - for (int idx=0; idx - *
  • Connection Name - *
  • Hostname/IP-address - *
  • UserId - *
  • Description - * - */ - -public class SystemNewConnectionWizardDefaultMainPage - //extends WizardPage - extends AbstractSystemWizardPage - implements ISystemNewConnectionWizardMainPage, - ISystemMessageLine, ISystemConnectionFormCaller -{ - protected String[] restrictSystemTypesTo; - protected SystemConnectionForm form; - protected String parentHelpId; - - /** - * Constructor. Use this when you want to supply your own title and - * description strings. - */ - public SystemNewConnectionWizardDefaultMainPage(Wizard wizard, - String title, - String description) - { - super(wizard, "NewConnection", title, description); //$NON-NLS-1$ - parentHelpId = RSEUIPlugin.HELPPREFIX + "wncc0000"; //$NON-NLS-1$ - setHelp(parentHelpId); - form = getForm(); - } - - /** - * Call this to restrict the system type that the user is allowed to choose - */ - public void restrictSystemType(String systemType) - { - restrictSystemTypesTo = new String[1]; - restrictSystemTypesTo[0] = systemType; - form.restrictSystemTypes(restrictSystemTypesTo); - } - /** - * Call this to restrict the system types that the user is allowed to choose - */ - public void restrictSystemTypes(String[] systemTypes) - { - restrictSystemTypesTo = systemTypes; - form.restrictSystemTypes(restrictSystemTypesTo); - } - - /** - * Return the main wizard typed - */ - private SystemNewConnectionWizard getOurWizard() - { - IWizard wizard = getWizard(); - if (wizard instanceof SystemNewConnectionWizard) - return (SystemNewConnectionWizard)wizard; - else - return null; - } - - - /** - * Overrride this if you want to supply your own form. This may be called - * multiple times so please only instantatiate if the form instance variable - * is null, and then return the form instance variable. - * @see org.eclipse.rse.ui.SystemConnectionForm - */ - protected SystemConnectionForm getForm() - { - if (form == null) - form = new SystemConnectionForm(this,this); - return form; - } - /** - * Call this to specify a validator for the connection name. It will be called per keystroke. - */ - public void setConnectionNameValidators(ISystemValidator[] v) - { - form.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); - } - /** - * Call this to specify a validator for the userId. It will be called per keystroke. - */ - public void setUserIdValidator(ISystemValidator v) - { - form.setUserIdValidator(v); - } - - /** - * This method allows setting of the initial user Id. Sometimes subsystems - * like to have their own default userId preference page option. If so, query - * it and set it here by calling this. - */ - public void setUserId(String userId) - { - form.setUserId(userId); - } - - /** - * Set the profile names to show in the combo - */ - public void setProfileNames(String[] names) - { - form.setProfileNames(names); - } - /** - * Set the profile name to preselect - */ - public void setProfileNamePreSelection(String name) - { - form.setProfileNamePreSelection(name); - } - - /** - * Set the currently selected connection so as to better initialize input fields - */ - public void setCurrentlySelectedConnection(IHost connection) - { - form.setCurrentlySelectedConnection(connection); - } - - /** - * Preset the connection name - */ - public void setConnectionName(String name) - { - form.setConnectionName(name); - } - /** - * Preset the host name - */ - public void setHostName(String name) - { - form.setHostName(name); - } - - - /** - * CreateContents is the one method that must be overridden from the parent class. - * In this method, we populate an SWT container with widgets and return the container - * 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 the Control to be given initial focus. - * Override from parent. Return control to be given initial focus. - */ - protected Control getInitialFocusControl() - { - return form.getInitialFocusControl(); - } - - /** - * Completes processing of the wizard. If this - * method returns true, the wizard will close; - * otherwise, it will stay active. - * This method is an override from the parent Wizard class. - * - * @return whether the wizard finished successfully - */ - public boolean performFinish() - { - return form.verify(true); - } - - // --------------------------------- // - // METHODS FOR EXTRACTING USER DATA ... - // --------------------------------- // - /** - * Return user-entered System Type. - * Call this after finish ends successfully. - */ - public String getSystemType() - { - return form.getSystemType(); - } - /** - * Return user-entered Connection Name. - * Call this after finish ends successfully. - */ - public String getConnectionName() - { - return form.getConnectionName(); - } - /** - * Return user-entered Host Name. - * Call this after finish ends successfully. - */ - public String getHostName() - { - return form.getHostName(); - } - /** - * Return user-entered Default User Id. - * Call this after finish ends successfully. - */ - public String getDefaultUserId() - { - return form.getDefaultUserId(); - } - /** - * Return location where default user id is to be set. - * @see org.eclipse.rse.core.IRSEUserIdConstants - */ - public int getDefaultUserIdLocation() - { - return form.getUserIdLocation(); - } - /** - * Return user-entered Description. - * Call this after finish ends successfully. - */ - public String getConnectionDescription() - { - return form.getConnectionDescription(); - } - /** - * Return name of profile to contain new connection. - * Call this after finish ends successfully. - */ - public String getProfileName() - { - return form.getProfileName(); - } - - // ISystemMessageLine methods -// public void clearMessage() -// { -// setMessage(null); -// } - //public void clearErrorMessage() - //{ - //setErrorMessage(null); - //} - - public Object getLayoutData() - { - return null; - } - - public void setLayoutData(Object gridData) - { - } - - - - /** - * Return true if the page is complete, so to enable Finish. - * Called by wizard framework. - */ - public boolean isPageComplete() - { - //System.out.println("Inside isPageComplete. " + form.isPageComplete()); - if (form!=null) - return form.isPageComplete() && form.isConnectionUnique(); - else - return false; - } - - /** - * Intercept of WizardPage so we know when Next is pressed - */ - public IWizardPage getNextPage() - { - //if (wizard == null) - //return null; - //return wizard.getNextPage(this); - - SystemNewConnectionWizard newConnWizard = getOurWizard(); - if (newConnWizard != null) - { - return newConnWizard.getFirstAdditionalPage(); - } - else - return super.getNextPage(); - } - /** - * Intercept of WizardPge so we know when the wizard framework is deciding whether - * to enable next or not. - */ - public boolean canFlipToNextPage() - { - //return isPageComplete() && getNextPage() != null; - - SystemNewConnectionWizard newConnWizard = getOurWizard(); - if (newConnWizard != null) - { - return (isPageComplete() && newConnWizard.hasAdditionalPages() && form.isConnectionUnique()); - } - else - return super.canFlipToNextPage(); - } - - // ---------------------------------------- - // CALLBACKS FROM SYSTEM CONNECTION FORM... - // ---------------------------------------- - /** - * Event: the user has selected a system type. - */ - public void systemTypeSelected(String systemType, boolean duringInitialization) - { - SystemNewConnectionWizard newConnWizard = getOurWizard(); - if (newConnWizard != null) - { - newConnWizard.systemTypeSelected(systemType, duringInitialization); - } - } - -} \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizardRenameProfilePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizardRenameProfilePage.java deleted file mode 100644 index 2e6f65ba86c..00000000000 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemNewConnectionWizardRenameProfilePage.java +++ /dev/null @@ -1,158 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, - * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * - * Contributors: - * {Name} (company) - description of contribution. - ********************************************************************************/ - -package org.eclipse.rse.ui.wizards; -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.rse.internal.model.SystemProfileManager; -import org.eclipse.rse.ui.RSEUIPlugin; -import org.eclipse.rse.ui.SystemProfileForm; -import org.eclipse.rse.ui.SystemResources; -import org.eclipse.rse.ui.messages.ISystemMessageLine; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; - - -/** - * First page of the New Connection wizard when creating - * the very first connection. - *

    - * This page asks for a unique personal name for the private profile. - */ - -public class SystemNewConnectionWizardRenameProfilePage - extends AbstractSystemWizardPage - implements - ISystemMessageLine -{ - - protected SystemProfileForm form; - - /** - * Constructor. - */ - public SystemNewConnectionWizardRenameProfilePage(Wizard wizard) - { - super(wizard, "RenamePrivateProfile", //$NON-NLS-1$ - SystemResources.RESID_RENAMEDEFAULTPROFILE_PAGE1_TITLE, - SystemResources.RESID_RENAMEDEFAULTPROFILE_PAGE1_DESCRIPTION); - form = getForm(); - setHelp(RSEUIPlugin.HELPPREFIX + "wncp0000"); //$NON-NLS-1$ - } - - /** - * Return our hosting wizard - */ - protected SystemNewConnectionWizard getOurWizard() - { - return (SystemNewConnectionWizard)getWizard(); - } - - /** - * Overrride this if you want to supply your own form. This may be called - * multiple times so please only instantatiate if the form instance variable - * is null, and then return the form instance variable. - * @see org.eclipse.rse.ui.SystemProfileForm - */ - protected SystemProfileForm getForm() - { - if (form == null) - form = new SystemProfileForm(this,this,null, true); - //SystemStartHere.getSystemProfileManager().getDefaultPrivateSystemProfile()); - return form; - } - /** - * CreateContents is the one method that must be overridden from the parent class. - * In this method, we populate an SWT container with widgets and return the container - * to the caller (JFace). This is used as the contents of this page. - */ - public Control createContents(Composite parent) - { - Control c = form.createContents(parent); - form.getInitialFocusControl().setFocus(); - String initProfileName = SystemProfileManager.getDefaultPrivateSystemProfileName(); - form.setProfileName(initProfileName); - return c; - } - /** - * Return the Control to be given initial focus. - * Override from parent. Return control to be given initial focus. - */ - protected Control getInitialFocusControl() - { - return form.getInitialFocusControl(); - } - - /** - * Completes processing of the wizard. If this - * method returns true, the wizard will close; - * otherwise, it will stay active. - * This method is an override from the parent Wizard class. - * - * @return whether the wizard finished successfully - */ - public boolean performFinish() - { - return form.verify(); - } - - // --------------------------------- // - // METHODS FOR EXTRACTING USER DATA ... - // --------------------------------- // - /** - * Return name of profile to contain new connection. - * Call this after finish ends successfully. - */ - public String getProfileName() - { - return form.getProfileName(); - } - - // ISystemMessageLine methods -// public void clearMessage() -// { -// setMessage(null); -// } - //public void clearErrorMessage() - //{ - //setErrorMessage(null); - //} - - public Object getLayoutData() - { - return null; - } - - public void setLayoutData(Object gridData) - { - } - - /** - * Return true if the page is complete, so to enable Finish. - * Called by wizard framework. - */ - public boolean isPageComplete() - { - boolean ok = false; - if (form!=null) - { - ok = form.isPageComplete(); - if (ok - && isCurrentPage()) // defect 41831 - getOurWizard().setNewPrivateProfileName(form.getProfileName()); - } - return ok; - } -} \ No newline at end of file