public PlugInTreeModel() {
super(new DefaultMutableTreeNode(
"<html><b>Installed PlugIn types and PlugIns</b></html>"), true);
root = (DefaultMutableTreeNode) getRoot();
Registry registry = SimSystem.getRegistry();
namePTDmapping = new HashMap<>();
List<Class<? extends Factory<?>>> factories =
registry.getKnownFactoryClasses();
for (Class<? extends Factory<?>> c : factories) {
Class<? extends AbstractFactory<?>> af =
registry.getAbstractFactoryForBaseFactory(c);
if (af != null) {
IPluginTypeData ptd = registry.getPluginType(af);
if (namePTDmapping.containsKey(ptd.getId().getName())) {
continue;
}
namePTDmapping.put(ptd.getId().getName(), ptd);
DefaultMutableTreeNode node;
root.add(node =
new DefaultMutableTreeNode(String.format(
"<html><b>%s</b> <i>(%s)</i></html>", ptd.getId().getName(),
ptd.getDescription())));
List<IPluginData> plugins = registry.getPlugins(af);
if (plugins != null && plugins.size() > 0) {
for (IPluginData pd : plugins) {
DefaultMutableTreeNode node2;
node.add(node2 = new DefaultMutableTreeNode(pd));