[yocto] [PATCH 3/3] Move filtering of suitable connections to RSEHelper
Ioana Grigoropol
ioanax.grigoropol at intel.com
Wed May 8 05:55:04 PDT 2013
- BaseSettingDialog performs an extra filtering for suitable connections for a given host by checking the remote system type
- this checking should be done in RSEHelper since it involves a remote action and thus removing BaseSettingDialog dependency on RSE Api
- modified RSEHelper.getSuitableConnections to include the filtering for connections with associated system type disabled
Signed-off-by: Ioana Grigoropol <ioanax.grigoropol at intel.com>
---
.../src/org/yocto/sdk/remotetools/RSEHelper.java | 4 ++++
.../sdk/remotetools/actions/BaseSettingDialog.java | 10 +++-------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/RSEHelper.java b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/RSEHelper.java
index d1a505d..8d0612a 100644
--- a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/RSEHelper.java
+++ b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/RSEHelper.java
@@ -150,6 +150,10 @@ public class RSEHelper {
if(!terminalConnections.contains(fileConnection) && !shellConnections.contains(fileConnection)){
iter.remove();
}
+ IRSESystemType sysType = fileConnection.getSystemType();
+ if (sysType != null && sysType.isEnabled()) {
+ iter.remove();
+ }
}
return (IHost[]) filConnections.toArray(new IHost[filConnections.size()]);
diff --git a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/BaseSettingDialog.java b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/BaseSettingDialog.java
index 06eeb00..962a20a 100644
--- a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/BaseSettingDialog.java
+++ b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/BaseSettingDialog.java
@@ -26,7 +26,6 @@ import org.yocto.sdk.remotetools.SWTFactory;
import org.yocto.sdk.remotetools.RSEHelper;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.ui.actions.SystemNewConnectionAction;
import org.eclipse.swt.SWT;
@@ -185,12 +184,9 @@ public class BaseSettingDialog extends Dialog {
connectionCombo.removeAll();
IHost[] connections = RSEHelper.getSuitableConnections();
for (int i = 0; i < connections.length; i++) {
- IRSESystemType sysType = connections[i].getSystemType();
- if (sysType != null && sysType.isEnabled()) {
- connectionCombo.add(connections[i].getAliasName());
- if(connections[i].getAliasName().equals(curConn))
- index=i;
- }
+ connectionCombo.add(connections[i].getAliasName());
+ if(connections[i].getAliasName().equals(curConn))
+ index=i;
}
if(index>=0) {
--
1.7.9.5
More information about the yocto
mailing list