mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +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:
parent
9d983938df
commit
15d2c59d3b
3 changed files with 17 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue