String kindVal = element.getAttributeValue(Attributes.KIND.get());
if (StringUtils.isSet(key) && value != null && typeVal != null && kindVal != null) {
IPreferenceScope.Kind kind = IPreferenceScope.Kind.values()[Integer.parseInt(kindVal)];
IPreferenceType type = IPreferenceType.values()[Integer.parseInt(typeVal)];
IPreference preference = Owl.getModelFactory().createPreference(key);
preference.setProperty(ITypeImporter.DATA_KEY, new Object[] { kind, type });
switch (type) {
case BOOLEAN:
preference.putBooleans(Boolean.parseBoolean(value));
break;
case INTEGER:
preference.putIntegers(Integer.parseInt(value));
break;
case INTEGERS:
preference.putIntegers((int[]) getPropertyValue(value, type));
break;
case LONG:
preference.putLongs(Long.parseLong(value));
break;
case LONGS:
preference.putLongs((long[]) getPropertyValue(value, type));
break;
case STRING:
preference.putStrings(value);
break;
case STRINGS:
preference.putStrings((String[]) getPropertyValue(value, type));
break;
}
importedEntities.add(preference);
}