View | Details | Raw Unified | Return to bug 196632 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorService.java (-12 / +18 lines)
Lines 19-24 Link Here
19
 * Javier Montalvo Orus (Symbian) - Fixing 176216 - [api] FTP sould provide API to allow clients register their own FTPListingParser
19
 * Javier Montalvo Orus (Symbian) - Fixing 176216 - [api] FTP sould provide API to allow clients register their own FTPListingParser
20
 * Javier Montalvo Orus (Symbian) - [187531] Improve exception thrown when Login Failed on FTP
20
 * Javier Montalvo Orus (Symbian) - [187531] Improve exception thrown when Login Failed on FTP
21
 * David Dykstal (IBM) - added RESID_FTP_SETTINGS_LABEL
21
 * David Dykstal (IBM) - added RESID_FTP_SETTINGS_LABEL
22
 * David McKnight       (IBM)     - [196632] [ftp] Passive mode setting does not work
22
 ********************************************************************************/
23
 ********************************************************************************/
23
24
24
package org.eclipse.rse.internal.subsystems.files.ftp.connectorservice;
25
package org.eclipse.rse.internal.subsystems.files.ftp.connectorservice;
Lines 48-68 Link Here
48
public class FTPConnectorService extends StandardConnectorService 
49
public class FTPConnectorService extends StandardConnectorService 
49
{
50
{
50
	protected FTPService _ftpService;
51
	protected FTPService _ftpService;
51
	private IPropertySet _propertySet;
52
	//private IPropertySet _propertySet;
52
	
53
	
53
	public FTPConnectorService(IHost host, int port)
54
	public FTPConnectorService(IHost host, int port)
54
	{		
55
	{		
55
		super(FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_NAME,FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_DESCRIPTION, host, port);
56
		super(FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_NAME,FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_DESCRIPTION, host, port);
56
		_ftpService = new FTPService();
57
		_ftpService = new FTPService();
57
			
58
		getPropertySet();
58
		_propertySet = getPropertySet("FTP Settings"); //$NON-NLS-1$
59
	}
60
	
61
	private IPropertySet getPropertySet()
62
	{
63
		IPropertySet propertySet = getPropertySet("FTP Settings"); //$NON-NLS-1$
59
		
64
		
60
		if(_propertySet==null)
65
		if(propertySet==null)
61
		{
66
		{
62
			
67
			
63
			//Active - passive mode
68
			//Active - passive mode
64
			_propertySet = createPropertySet("FTP Settings"); //$NON-NLS-1$
69
			propertySet = createPropertySet("FTP Settings"); //$NON-NLS-1$
65
			_propertySet.addProperty("passive","false",PropertyType.getEnumPropertyType(new String[]{"true","false"})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
70
			propertySet.addProperty("passive","false",PropertyType.getEnumPropertyType(new String[]{"true","false"})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
66
			
71
			
67
			// FTP List parser
72
			// FTP List parser
68
			String[] keys = FTPClientConfigFactory.getParserFactory().getKeySet();
73
			String[] keys = FTPClientConfigFactory.getParserFactory().getKeySet();
Lines 74-86 Link Here
74
			
79
			
75
			Arrays.sort(keysArray);
80
			Arrays.sort(keysArray);
76
			
81
			
77
			_propertySet.addProperty("parser","AUTO",PropertyType.getEnumPropertyType(keysArray)); //$NON-NLS-1$ //$NON-NLS-2$
82
			propertySet.addProperty("parser","AUTO",PropertyType.getEnumPropertyType(keysArray)); //$NON-NLS-1$ //$NON-NLS-2$
78
		}
83
		}
79
		if (_propertySet instanceof ILabeledObject) {
84
		if (propertySet instanceof ILabeledObject) {
80
			String label = FTPSubsystemResources.RESID_FTP_SETTINGS_LABEL;
85
			String label = FTPSubsystemResources.RESID_FTP_SETTINGS_LABEL;
81
			((ILabeledObject)_propertySet).setLabel(label);
86
			((ILabeledObject)propertySet).setLabel(label);
82
		}
87
		}
83
	} 
88
		return propertySet;
89
	}
84
	
90
	
85
	protected void internalConnect(IProgressMonitor monitor)  throws RemoteFileException, IOException
91
	protected void internalConnect(IProgressMonitor monitor)  throws RemoteFileException, IOException
86
	{
92
	{
Lines 89-102 Link Here
89
95
90
	private void internalConnect() throws RemoteFileException, IOException
96
	private void internalConnect() throws RemoteFileException, IOException
91
	{
97
	{
92
98
		IPropertySet propertySet = getPropertySet();
93
		SystemSignonInformation info = getSignonInformation();
99
		SystemSignonInformation info = getSignonInformation();
94
		_ftpService.setHostName(info.getHostname());
100
		_ftpService.setHostName(info.getHostname());
95
		_ftpService.setUserId(info.getUserId());
101
		_ftpService.setUserId(info.getUserId());
96
		_ftpService.setPassword(info.getPassword());
102
		_ftpService.setPassword(info.getPassword());
97
		_ftpService.setPortNumber(getPort());
103
		_ftpService.setPortNumber(getPort());
98
		_ftpService.setLoggingStream(getLoggingStream(info.getHostname(),getPort()));
104
		_ftpService.setLoggingStream(getLoggingStream(info.getHostname(),getPort()));
99
		_ftpService.setPropertySet(_propertySet);
105
		_ftpService.setPropertySet(propertySet);
100
		_ftpService.setFTPClientConfigFactory(FTPClientConfigFactory.getParserFactory());
106
		_ftpService.setFTPClientConfigFactory(FTPClientConfigFactory.getParserFactory());
101
		
107
		
102
		
108
		
(-)UI/org/eclipse/rse/ui/widgets/services/ServicesForm.java (-5 / +12 lines)
Lines 12-18 Link Here
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * {Name} (company) - description of contribution.
15
 * David McKnight (IBM) [196632] make sure selected element is marked selected
16
 *******************************************************************************/
16
 *******************************************************************************/
17
17
18
package org.eclipse.rse.ui.widgets.services;
18
package org.eclipse.rse.ui.widgets.services;
Lines 137-146 Link Here
137
            	if (selection instanceof StructuredSelection)
137
            	if (selection instanceof StructuredSelection)
138
            	{
138
            	{
139
            		StructuredSelection ss = (StructuredSelection)selection;
139
            		StructuredSelection ss = (StructuredSelection)selection;
140
            		_factoryViewer.setChecked(ss.getFirstElement(), true);
140
            		
141
            		unCheckOthers((ServiceElement) ss.getFirstElement());
141
            		ServiceElement firstElement = (ServiceElement)ss.getFirstElement();
142
            		_serviceViewer.setInput(ss.getFirstElement());
142
            		if (firstElement != null)
143
            		_descriptionVerbiage.setText(getCurrentVerbiage());
143
            		{            			
144
            			_factoryViewer.setChecked(firstElement, true);            		
145
            			unCheckOthers(firstElement);
146
            			if (!firstElement.isSelected())
147
            				firstElement.setSelected(true);
148
            			_serviceViewer.setInput(firstElement);
149
            			_descriptionVerbiage.setText(getCurrentVerbiage());
150
            		}
144
            	}
151
            	}
145
            }
152
            }
146
         });
153
         });
(-)UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java (-1 / +1 lines)
Lines 250-256 Link Here
250
	 */
250
	 */
251
	private List getConnectorServiceElements(ServiceElement root) {
251
	private List getConnectorServiceElements(ServiceElement root) {
252
		List result = new ArrayList(10);
252
		List result = new ArrayList(10);
253
		if(root.isSelected())
253
		if (!(root instanceof FactoryServiceElement) || root.isSelected())
254
		{
254
		{
255
			if (root instanceof ConnectorServiceElement) {
255
			if (root instanceof ConnectorServiceElement) {
256
				result.add(root);
256
				result.add(root);

Return to bug 196632