final ConfigDescriptionEntry entry;
switch (getEntryType())
{
case ConfigDescriptionEditor.TYPE_CLASS:
{
final ClassConfigDescriptionEntry ce = new ClassConfigDescriptionEntry(keyNameField.getText());
ce.setDescription(descriptionField.getText());
ce.setGlobal(globalField.isSelected());
ce.setHidden(hiddenField.isSelected());
try
{
final String className = baseClassField.getText();
if (className == null)
{
ce.setBaseClass(Object.class);
}
else
{
final ClassLoader classLoader = ObjectUtilities.getClassLoader(getClass());
final Class c = Class.forName(className, false, classLoader);
ce.setBaseClass(c);
}
}
catch (Exception e)
{
// invalid
ConfigDescriptionEditor.logger.debug("Class is invalid; defaulting to Object.class"); //$NON-NLS-1$
ce.setBaseClass(Object.class);
}
entry = ce;
break;
}
case ConfigDescriptionEditor.TYPE_ENUM: