### Eclipse Workspace Patch 1.0 #P org.eclipse.rse.subsystems.files.ftp Index: src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorService.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.ftp/src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorService.java,v retrieving revision 1.15 diff -u -r1.15 FTPConnectorService.java --- src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorService.java 31 May 2007 14:16:51 -0000 1.15 +++ src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorService.java 31 Jul 2007 20:15:23 -0000 @@ -19,6 +19,7 @@ * Javier Montalvo Orus (Symbian) - Fixing 176216 - [api] FTP sould provide API to allow clients register their own FTPListingParser * Javier Montalvo Orus (Symbian) - [187531] Improve exception thrown when Login Failed on FTP * David Dykstal (IBM) - added RESID_FTP_SETTINGS_LABEL + * David McKnight (IBM) - [196632] [ftp] Passive mode setting does not work ********************************************************************************/ package org.eclipse.rse.internal.subsystems.files.ftp.connectorservice; @@ -48,21 +49,25 @@ public class FTPConnectorService extends StandardConnectorService { protected FTPService _ftpService; - private IPropertySet _propertySet; + //private IPropertySet _propertySet; public FTPConnectorService(IHost host, int port) { super(FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_NAME,FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_DESCRIPTION, host, port); _ftpService = new FTPService(); - - _propertySet = getPropertySet("FTP Settings"); //$NON-NLS-1$ + getPropertySet(); + } + + private IPropertySet getPropertySet() + { + IPropertySet propertySet = getPropertySet("FTP Settings"); //$NON-NLS-1$ - if(_propertySet==null) + if(propertySet==null) { //Active - passive mode - _propertySet = createPropertySet("FTP Settings"); //$NON-NLS-1$ - _propertySet.addProperty("passive","false",PropertyType.getEnumPropertyType(new String[]{"true","false"})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + propertySet = createPropertySet("FTP Settings"); //$NON-NLS-1$ + propertySet.addProperty("passive","false",PropertyType.getEnumPropertyType(new String[]{"true","false"})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ // FTP List parser String[] keys = FTPClientConfigFactory.getParserFactory().getKeySet(); @@ -74,13 +79,14 @@ Arrays.sort(keysArray); - _propertySet.addProperty("parser","AUTO",PropertyType.getEnumPropertyType(keysArray)); //$NON-NLS-1$ //$NON-NLS-2$ + propertySet.addProperty("parser","AUTO",PropertyType.getEnumPropertyType(keysArray)); //$NON-NLS-1$ //$NON-NLS-2$ } - if (_propertySet instanceof ILabeledObject) { + if (propertySet instanceof ILabeledObject) { String label = FTPSubsystemResources.RESID_FTP_SETTINGS_LABEL; - ((ILabeledObject)_propertySet).setLabel(label); + ((ILabeledObject)propertySet).setLabel(label); } - } + return propertySet; + } protected void internalConnect(IProgressMonitor monitor) throws RemoteFileException, IOException { @@ -89,14 +95,14 @@ private void internalConnect() throws RemoteFileException, IOException { - + IPropertySet propertySet = getPropertySet(); SystemSignonInformation info = getSignonInformation(); _ftpService.setHostName(info.getHostname()); _ftpService.setUserId(info.getUserId()); _ftpService.setPassword(info.getPassword()); _ftpService.setPortNumber(getPort()); _ftpService.setLoggingStream(getLoggingStream(info.getHostname(),getPort())); - _ftpService.setPropertySet(_propertySet); + _ftpService.setPropertySet(propertySet); _ftpService.setFTPClientConfigFactory(FTPClientConfigFactory.getParserFactory()); #P org.eclipse.rse.ui Index: UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java,v retrieving revision 1.10 diff -u -r1.10 ServicesForm.java --- UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java 5 Jun 2007 11:36:53 -0000 1.10 +++ UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java 31 Jul 2007 20:15:25 -0000 @@ -12,7 +12,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * David McKnight (IBM) [196632] make sure selected element is marked selected *******************************************************************************/ package org.eclipse.rse.ui.widgets.services; @@ -137,10 +137,17 @@ if (selection instanceof StructuredSelection) { StructuredSelection ss = (StructuredSelection)selection; - _factoryViewer.setChecked(ss.getFirstElement(), true); - unCheckOthers((ServiceElement) ss.getFirstElement()); - _serviceViewer.setInput(ss.getFirstElement()); - _descriptionVerbiage.setText(getCurrentVerbiage()); + + ServiceElement firstElement = (ServiceElement)ss.getFirstElement(); + if (firstElement != null) + { + _factoryViewer.setChecked(firstElement, true); + unCheckOthers(firstElement); + if (!firstElement.isSelected()) + firstElement.setSelected(true); + _serviceViewer.setInput(firstElement); + _descriptionVerbiage.setText(getCurrentVerbiage()); + } } } }); Index: UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java,v retrieving revision 1.25 diff -u -r1.25 SubSystemServiceWizardPage.java --- UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java 17 Jul 2007 18:36:59 -0000 1.25 +++ UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java 31 Jul 2007 20:15:25 -0000 @@ -250,7 +250,7 @@ */ private List getConnectorServiceElements(ServiceElement root) { List result = new ArrayList(10); - if(root.isSelected()) + if (!(root instanceof FactoryServiceElement) || root.isSelected()) { if (root instanceof ConnectorServiceElement) { result.add(root);