mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-14 20:45:22 +02:00
[196632] Passive mode setting does not work
This commit is contained in:
parent
0689688bfa
commit
cfd90b9336
3 changed files with 30 additions and 18 deletions
|
@ -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) - 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
|
* Javier Montalvo Orus (Symbian) - [187531] Improve exception thrown when Login Failed on FTP
|
||||||
* David Dykstal (IBM) - added RESID_FTP_SETTINGS_LABEL
|
* 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;
|
package org.eclipse.rse.internal.subsystems.files.ftp.connectorservice;
|
||||||
|
@ -48,21 +49,24 @@ import org.eclipse.ui.console.MessageConsole;
|
||||||
public class FTPConnectorService extends StandardConnectorService
|
public class FTPConnectorService extends StandardConnectorService
|
||||||
{
|
{
|
||||||
protected FTPService _ftpService;
|
protected FTPService _ftpService;
|
||||||
private IPropertySet _propertySet;
|
|
||||||
|
|
||||||
public FTPConnectorService(IHost host, int port)
|
public FTPConnectorService(IHost host, int port)
|
||||||
{
|
{
|
||||||
super(FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_NAME,FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_DESCRIPTION, host, port);
|
super(FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_NAME,FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_DESCRIPTION, host, port);
|
||||||
_ftpService = new FTPService();
|
_ftpService = new FTPService();
|
||||||
|
getPropertySet();
|
||||||
_propertySet = getPropertySet("FTP Settings"); //$NON-NLS-1$
|
}
|
||||||
|
|
||||||
|
private IPropertySet getPropertySet()
|
||||||
|
{
|
||||||
|
IPropertySet propertySet = getPropertySet("FTP Settings"); //$NON-NLS-1$
|
||||||
|
|
||||||
if(_propertySet==null)
|
if(propertySet==null)
|
||||||
{
|
{
|
||||||
|
|
||||||
//Active - passive mode
|
//Active - passive mode
|
||||||
_propertySet = createPropertySet("FTP Settings"); //$NON-NLS-1$
|
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.addProperty("passive","false",PropertyType.getEnumPropertyType(new String[]{"true","false"})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||||
|
|
||||||
// FTP List parser
|
// FTP List parser
|
||||||
String[] keys = FTPClientConfigFactory.getParserFactory().getKeySet();
|
String[] keys = FTPClientConfigFactory.getParserFactory().getKeySet();
|
||||||
|
@ -74,13 +78,14 @@ public class FTPConnectorService extends StandardConnectorService
|
||||||
|
|
||||||
Arrays.sort(keysArray);
|
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;
|
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
|
protected void internalConnect(IProgressMonitor monitor) throws RemoteFileException, IOException
|
||||||
{
|
{
|
||||||
|
@ -89,14 +94,14 @@ public class FTPConnectorService extends StandardConnectorService
|
||||||
|
|
||||||
private void internalConnect() throws RemoteFileException, IOException
|
private void internalConnect() throws RemoteFileException, IOException
|
||||||
{
|
{
|
||||||
|
IPropertySet propertySet = getPropertySet();
|
||||||
SystemSignonInformation info = getSignonInformation();
|
SystemSignonInformation info = getSignonInformation();
|
||||||
_ftpService.setHostName(info.getHostname());
|
_ftpService.setHostName(info.getHostname());
|
||||||
_ftpService.setUserId(info.getUserId());
|
_ftpService.setUserId(info.getUserId());
|
||||||
_ftpService.setPassword(info.getPassword());
|
_ftpService.setPassword(info.getPassword());
|
||||||
_ftpService.setPortNumber(getPort());
|
_ftpService.setPortNumber(getPort());
|
||||||
_ftpService.setLoggingStream(getLoggingStream(info.getHostname(),getPort()));
|
_ftpService.setLoggingStream(getLoggingStream(info.getHostname(),getPort()));
|
||||||
_ftpService.setPropertySet(_propertySet);
|
_ftpService.setPropertySet(propertySet);
|
||||||
_ftpService.setFTPClientConfigFactory(FTPClientConfigFactory.getParserFactory());
|
_ftpService.setFTPClientConfigFactory(FTPClientConfigFactory.getParserFactory());
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* David McKnight (IBM) [196632] make sure selected element is marked selected
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.ui.widgets.services;
|
package org.eclipse.rse.ui.widgets.services;
|
||||||
|
@ -137,10 +137,17 @@ public class ServicesForm extends SystemBaseForm implements ICheckStateListener
|
||||||
if (selection instanceof StructuredSelection)
|
if (selection instanceof StructuredSelection)
|
||||||
{
|
{
|
||||||
StructuredSelection ss = (StructuredSelection)selection;
|
StructuredSelection ss = (StructuredSelection)selection;
|
||||||
_factoryViewer.setChecked(ss.getFirstElement(), true);
|
|
||||||
unCheckOthers((ServiceElement) ss.getFirstElement());
|
ServiceElement firstElement = (ServiceElement)ss.getFirstElement();
|
||||||
_serviceViewer.setInput(ss.getFirstElement());
|
if (firstElement != null)
|
||||||
_descriptionVerbiage.setText(getCurrentVerbiage());
|
{
|
||||||
|
_factoryViewer.setChecked(firstElement, true);
|
||||||
|
unCheckOthers(firstElement);
|
||||||
|
if (!firstElement.isSelected())
|
||||||
|
firstElement.setSelected(true);
|
||||||
|
_serviceViewer.setInput(firstElement);
|
||||||
|
_descriptionVerbiage.setText(getCurrentVerbiage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -250,7 +250,7 @@ public class SubSystemServiceWizardPage extends AbstractSystemNewConnectionWizar
|
||||||
*/
|
*/
|
||||||
private List getConnectorServiceElements(ServiceElement root) {
|
private List getConnectorServiceElements(ServiceElement root) {
|
||||||
List result = new ArrayList(10);
|
List result = new ArrayList(10);
|
||||||
if(root.isSelected())
|
if (!(root instanceof FactoryServiceElement) || root.isSelected())
|
||||||
{
|
{
|
||||||
if (root instanceof ConnectorServiceElement) {
|
if (root instanceof ConnectorServiceElement) {
|
||||||
result.add(root);
|
result.add(root);
|
||||||
|
|
Loading…
Add table
Reference in a new issue