mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-16 13:35:22 +02:00
[243332] Removing wizard page caused subsystem to be removed -updated so that we can handle the case where there's more than one page for one config
This commit is contained in:
parent
4e51d5a6c1
commit
eae2356377
1 changed files with 31 additions and 33 deletions
|
@ -298,42 +298,40 @@ public class RSEDefaultNewConnectionWizard extends RSEAbstractNewConnectionWizar
|
||||||
IRSESystemType systemType = getSystemType();
|
IRSESystemType systemType = getSystemType();
|
||||||
ISubSystemConfiguration[] configurations = sr.getSubSystemConfigurationsBySystemType(systemType, true);
|
ISubSystemConfiguration[] configurations = sr.getSubSystemConfigurationsBySystemType(systemType, true);
|
||||||
|
|
||||||
// should be one configuration per configurator
|
ArrayList configList = new ArrayList();
|
||||||
if (configurations.length <= subsystemConfigurationSuppliedWizardPages.length)
|
for (int i = 0; i < configurations.length; i++){
|
||||||
return subsystemConfigurationSuppliedWizardPages;
|
ISubSystemConfiguration configuration = configurations[i];
|
||||||
else { // missing pages for configurations
|
ISubSystemConfigurator firstMatch = null;
|
||||||
ArrayList configList = new ArrayList();
|
for (int j = 0; j < subsystemConfigurationSuppliedWizardPages.length; j++){
|
||||||
for (int i = 0; i < configurations.length; i++){
|
ISystemNewConnectionWizardPage page = subsystemConfigurationSuppliedWizardPages[j];
|
||||||
ISubSystemConfiguration configuration = configurations[i];
|
ISubSystemConfiguration pageConfiguration = page.getSubSystemConfiguration();
|
||||||
boolean foundMatch = false;
|
if (configuration == pageConfiguration){ // found a match
|
||||||
for (int j = 0; j < subsystemConfigurationSuppliedWizardPages.length && !foundMatch; j++){
|
configList.add(page); // could be more than one
|
||||||
ISystemNewConnectionWizardPage page = subsystemConfigurationSuppliedWizardPages[j];
|
if (firstMatch == null){
|
||||||
ISubSystemConfiguration pageConfiguration = page.getSubSystemConfiguration();
|
firstMatch = page;
|
||||||
if (configuration == pageConfiguration){ // found a match
|
|
||||||
configList.add(page);
|
|
||||||
foundMatch = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!foundMatch){ // no match found so need to provide alternative
|
}
|
||||||
class DefaultConfigurator implements ISubSystemConfigurator {
|
if (firstMatch == null){ // no match found so need to provide alternative
|
||||||
private ISubSystemConfiguration _configuration;
|
class DefaultConfigurator implements ISubSystemConfigurator {
|
||||||
public DefaultConfigurator(ISubSystemConfiguration configuration){
|
private ISubSystemConfiguration _configuration;
|
||||||
_configuration = configuration;
|
public DefaultConfigurator(ISubSystemConfiguration configuration){
|
||||||
}
|
_configuration = configuration;
|
||||||
|
|
||||||
public boolean applyValues(ISubSystem ss) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ISubSystemConfiguration getSubSystemConfiguration() {
|
|
||||||
return _configuration;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
configList.add(new DefaultConfigurator(configuration));
|
|
||||||
}
|
public boolean applyValues(ISubSystem ss) {
|
||||||
}
|
return true;
|
||||||
return (ISubSystemConfigurator[])configList.toArray(new ISubSystemConfigurator[configList.size()]);
|
}
|
||||||
}
|
|
||||||
|
public ISubSystemConfiguration getSubSystemConfiguration() {
|
||||||
|
return _configuration;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
configList.add(new DefaultConfigurator(configuration));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (ISubSystemConfigurator[])configList.toArray(new ISubSystemConfigurator[configList.size()]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue