1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-20 06:35:50 +02:00

Bug 163727 - fixed the retrieval of the default system types

This commit is contained in:
David Dykstal 2006-11-08 16:44:13 +00:00
parent 58fb2ec9ce
commit e7e6ce5379

View file

@ -308,30 +308,26 @@ public class SystemTypeFieldEditor extends FieldEditor
return sb.toString(); return sb.toString();
} }
private IRSESystemType[] getSystemTypes(boolean defaults) /**
{ * Retrieve an array of currently known system types.
* @param restoreDefaults restore the default values for the system types
* @return The list of system types known to be in existence
*/
private IRSESystemType[] getSystemTypes(boolean restoreDefaults) {
IRSESystemType[] types = RSECorePlugin.getDefault().getRegistry().getSystemTypes(); IRSESystemType[] types = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
ArrayList list = new ArrayList(); ArrayList list = new ArrayList();
if (systemTypes == null || restoreDefaults) {
if (systemTypes == null) {
for (int i = 0; i < types.length; i++) { for (int i = 0; i < types.length; i++) {
ISubSystemConfiguration[] configurations = RSEUIPlugin.getTheSystemRegistry().getSubSystemConfigurationsBySystemType(types[i].getName()); ISubSystemConfiguration[] configurations = RSEUIPlugin.getTheSystemRegistry().getSubSystemConfigurationsBySystemType(types[i].getName());
if (configurations != null && configurations.length > 0) { if (configurations != null && configurations.length > 0) {
list.add(types[i]); list.add(types[i]);
} }
} }
} }
types = new IRSESystemType[list.size()]; types = new IRSESystemType[list.size()];
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
types[i] = (IRSESystemType)(list.get(i)); types[i] = (IRSESystemType) (list.get(i));
} }
return types; return types;
} }