diff --git a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java index e5cf34e5bbe..da0d80cf5c9 100644 --- a/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java +++ b/rse/plugins/org.eclipse.rse.core/persistence/org/eclipse/rse/internal/persistence/dom/RSEDOMImporter.java @@ -235,7 +235,9 @@ public class RSEDOMImporter implements IRSEDOMImporter { } if (subSystem == null) { - subSystem = factory.createSubSystemInternal(host); + // subSystem = factory.createSubSystemInternal(host); + ISubSystem[] createdSystems = _registry.createSubSystems(host, new ISubSystemConfiguration[]{factory}); + subSystem = createdSystems[0]; } subSystem.setHidden(isHidden); subSystem.setHost(host); diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java index 7f819596a0e..b379082dd01 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java @@ -524,6 +524,15 @@ public interface ISystemRegistry extends ISchedulingRule { * because the connectionName is not unique. Call getLastException() if necessary. */ public IHost createHost(String systemType, String connectionName, String hostName, String description) throws Exception; + + /** + * Creates subsystems for a given host and subsystem configurations. + * @param host the host. + * @param configurations the subsystem configurations. + * @return the array of subsystems corresponding to the array of given configurations. + * @since 2.0 + */ + public ISubSystem[] createSubSystems(IHost host, ISubSystemConfiguration[] configurations); /** * Update the workoffline mode for a connection. 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 5d1b3a9cbf7..863015ad590 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 @@ -2257,12 +2257,13 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven } /** - * Creates subsystem for a given host. + * Creates subsystems for a given host and subsystem configurations. * @param host the host. - * @param configurations the subsystem configurations + * @param configurations the subsystem configurations. + * @return the array of subsystems corresponding to the array of given configurations. * @since 2.0 */ - public void createSubSystems(IHost host, ISubSystemConfiguration[] configurations) { + public ISubSystem[] createSubSystems(IHost host, ISubSystemConfiguration[] configurations) { ISubSystem[] subsystems = new ISubSystem[configurations.length]; @@ -2275,6 +2276,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven } RSEUIPlugin.getThePersistenceManager().commit(host); + return subsystems; }