From 881441ad83b0b5a5fa496f1d15a572a045de8945 Mon Sep 17 00:00:00 2001 From: Kushal Munir < kmunir@ca.ibm.com> Date: Thu, 15 Feb 2007 23:38:34 +0000 Subject: [PATCH] [150265] Fix problems with multiple connections showing up when using createSubSystems() in SystemRegistry --- .../org/eclipse/rse/model/SystemRegistry.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java index 2c473d7dbf2..5d1b3a9cbf7 100644 --- a/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java +++ b/rse/plugins/org.eclipse.rse.ui/model/org/eclipse/rse/model/SystemRegistry.java @@ -1233,8 +1233,8 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven { for (int idx = 0; idx < subsystemFactoryProxies.length; idx++) { - if (subsystemFactoryProxies[idx].appliesToSystemType(conn.getSystemType())) - { + // if (subsystemFactoryProxies[idx].appliesToSystemType(conn.getSystemType())) + // { ISubSystemConfiguration factory = subsystemFactoryProxies[idx].getSubSystemConfiguration(); if (factory != null) { @@ -1243,7 +1243,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven for (int jdx = 0; jdx < sss.length; jdx++) v.addElement(sss[jdx]); } - } + // } } //if (v.size() > 0) //{ @@ -2267,11 +2267,13 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven ISubSystem[] subsystems = new ISubSystem[configurations.length]; for (int i = 0; i < configurations.length; i++) { - subsystems[i] = configurations[i].createSubSystem(host, false, null); + subsystems[i] = configurations[i].createSubSystem(host, true, null); + } + + for (int j = 0; j < subsystems.length; j++) { + fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_SUBSYSTEM, subsystems[j], null); } - FireNewHostEvents fire = new FireNewHostEvents(host, subsystems, this); - Display.getDefault().syncExec(fire); RSEUIPlugin.getThePersistenceManager().commit(host); }