1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-09 18:15:23 +02:00

[150265] Fix problem with persistence of newly created subsystems that are not registered through an extension point for the system type of the host.

This commit is contained in:
Kushal Munir 2007-02-16 16:04:51 +00:00
parent 9d983938df
commit 15d2c59d3b
3 changed files with 17 additions and 4 deletions

View file

@ -235,7 +235,9 @@ public class RSEDOMImporter implements IRSEDOMImporter {
} }
if (subSystem == null) { 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.setHidden(isHidden);
subSystem.setHost(host); subSystem.setHost(host);

View file

@ -524,6 +524,15 @@ public interface ISystemRegistry extends ISchedulingRule {
* because the connectionName is not unique. Call getLastException() if necessary. * because the connectionName is not unique. Call getLastException() if necessary.
*/ */
public IHost createHost(String systemType, String connectionName, String hostName, String description) throws Exception; 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. * Update the workoffline mode for a connection.

View file

@ -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 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 * @since 2.0
*/ */
public void createSubSystems(IHost host, ISubSystemConfiguration[] configurations) { public ISubSystem[] createSubSystems(IHost host, ISubSystemConfiguration[] configurations) {
ISubSystem[] subsystems = new ISubSystem[configurations.length]; ISubSystem[] subsystems = new ISubSystem[configurations.length];
@ -2275,6 +2276,7 @@ public class SystemRegistry implements ISystemRegistryUI, ISystemModelChangeEven
} }
RSEUIPlugin.getThePersistenceManager().commit(host); RSEUIPlugin.getThePersistenceManager().commit(host);
return subsystems;
} }