tool.setClassname(classname);
tool.setKey(key);
toolbox.addTool(tool);
// get tool properties prefixed by 'property'
ExtendedProperties toolProps = tools.subset(key);
readProperties(toolProps, tool);
// ok, get tool properties that aren't prefixed by 'property'
for (Iterator j = toolProps.getKeys(); j.hasNext(); )
{
String name = (String)j.next();
if (!name.equals(tool.getKey()))
{
tool.setProperty(name, toolProps.getString(name));
}
}
// get special props explicitly
String restrictTo = toolProps.getString("restrictTo");
tool.setRestrictTo(restrictTo);
}
}