### Eclipse Workspace Patch 1.0 #P org.eclipse.rse.ui Index: UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAllSubSystemsAction.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAllSubSystemsAction.java,v retrieving revision 1.3 diff -u -r1.3 SystemDisconnectAllSubSystemsAction.java --- UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAllSubSystemsAction.java 14 May 2007 13:04:54 -0000 1.3 +++ UI/org/eclipse/rse/internal/ui/actions/SystemDisconnectAllSubSystemsAction.java 23 Jul 2007 20:15:40 -0000 @@ -12,10 +12,13 @@ * * Contributors: * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry + * Kevin Doyle (IBM) - [175277] Cannot disconnect multiple connections at once with multiselect ********************************************************************************/ package org.eclipse.rse.internal.ui.actions; +import java.util.Iterator; + import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.ISystemRegistry; @@ -40,7 +43,7 @@ public SystemDisconnectAllSubSystemsAction(Shell shell) { super(SystemResources.ACTION_DISCONNECTALLSUBSYSTEMS_LABEL, SystemResources.ACTION_DISCONNECTALLSUBSYSTEMS_TOOLTIP, shell); - allowOnMultipleSelection(false); + allowOnMultipleSelection(true); setContextMenuGroup(ISystemContextMenuConstants.GROUP_CONNECTION); sr = RSECorePlugin.getTheSystemRegistry(); // TODO help for connect all @@ -65,9 +68,14 @@ */ public void run() { - IHost conn = (IHost)getFirstSelection(); - try { - sr.disconnectAllSubSystems(conn); - } catch (Exception exc) {} // msg already shown + Iterator it = getSelection().iterator(); + while (it.hasNext()) { + Object item = it.next(); + if (item instanceof IHost) { + try { + sr.disconnectAllSubSystems((IHost) item); + } catch (Exception exc) {} // msg already shown + } + } } } \ No newline at end of file