1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-20 06:35:50 +02:00

look for active connection for host before inactive

This commit is contained in:
David McKnight 2006-08-02 15:31:45 +00:00
parent 5230031f6d
commit 20df494a4a

View file

@ -63,6 +63,7 @@ public class RSEFileSystem extends FileSystem
{ {
ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry(); ISystemRegistry sr = RSEUIPlugin.getTheSystemRegistry();
IHost[] connections = sr.getHosts(); IHost[] connections = sr.getHosts();
IHost unconnected = null;
for (int i = 0; i < connections.length; i++) for (int i = 0; i < connections.length; i++)
{ {
IHost con = connections[i]; IHost con = connections[i];
@ -77,9 +78,11 @@ public class RSEFileSystem extends FileSystem
} }
if (isConnected) if (isConnected)
return con; return con;
else
unconnected = con;
} }
} }
return null; return unconnected;
} }
public static IRemoteFileSubSystem getRemoteFileSubSystem(IHost host) public static IRemoteFileSubSystem getRemoteFileSubSystem(IHost host)