VisualizePlugin plugin = (VisualizePlugin) Class.forName(className).newInstance();
if (plugin == null)
continue;
availablePlugins = true;
JMenuItem pluginMenuItem = plugin.getVisualizeMenuItem(preds, classAtt);
Version version = new Version();
if (pluginMenuItem != null) {
/*if (version.compareTo(plugin.getMinVersion()) < 0)
pluginMenuItem.setText(pluginMenuItem.getText() + " (weka outdated)");
if (version.compareTo(plugin.getMaxVersion()) >= 0)
pluginMenuItem.setText(pluginMenuItem.getText() + " (plugin outdated)"); */
visPlugins.add(pluginMenuItem);
}
}
catch (Exception e) {
//e.printStackTrace();
}
}
// errros
pluginsVector = GenericObjectEditor.getClassnames(ErrorVisualizePlugin.class.getName());
for (int i = 0; i < pluginsVector.size(); i++) {
String className = (String) (pluginsVector.elementAt(i));
try {
ErrorVisualizePlugin plugin = (ErrorVisualizePlugin) Class.forName(className).newInstance();
if (plugin == null)
continue;
availablePlugins = true;
JMenuItem pluginMenuItem = plugin.getVisualizeMenuItem(vp.getInstances());
Version version = new Version();
if (pluginMenuItem != null) {
/*if (version.compareTo(plugin.getMinVersion()) < 0)
pluginMenuItem.setText(pluginMenuItem.getText() + " (weka outdated)");
if (version.compareTo(plugin.getMaxVersion()) >= 0)
pluginMenuItem.setText(pluginMenuItem.getText() + " (plugin outdated)"); */
visPlugins.add(pluginMenuItem);
}
}
catch (Exception e) {
//e.printStackTrace();
}
}
// graphs+trees
if (grph != null) {
// trees
if (((Drawable) temp_classifier).graphType() == Drawable.TREE) {
pluginsVector = GenericObjectEditor.getClassnames(TreeVisualizePlugin.class.getName());
for (int i = 0; i < pluginsVector.size(); i++) {
String className = (String) (pluginsVector.elementAt(i));
try {
TreeVisualizePlugin plugin = (TreeVisualizePlugin) Class.forName(className).newInstance();
if (plugin == null)
continue;
availablePlugins = true;
JMenuItem pluginMenuItem = plugin.getVisualizeMenuItem(grph, selectedName);
Version version = new Version();
if (pluginMenuItem != null) {
/*if (version.compareTo(plugin.getMinVersion()) < 0)
pluginMenuItem.setText(pluginMenuItem.getText() + " (weka outdated)");
if (version.compareTo(plugin.getMaxVersion()) >= 0)
pluginMenuItem.setText(pluginMenuItem.getText() + " (plugin outdated)"); */
visPlugins.add(pluginMenuItem);
}
}
catch (Exception e) {
//e.printStackTrace();
}
}
}
// graphs
else {
pluginsVector = GenericObjectEditor.getClassnames(GraphVisualizePlugin.class.getName());
for (int i = 0; i < pluginsVector.size(); i++) {
String className = (String) (pluginsVector.elementAt(i));
try {
GraphVisualizePlugin plugin = (GraphVisualizePlugin) Class.forName(className).newInstance();
if (plugin == null)
continue;
availablePlugins = true;
JMenuItem pluginMenuItem = plugin.getVisualizeMenuItem(grph, selectedName);
Version version = new Version();
if (pluginMenuItem != null) {
/*if (version.compareTo(plugin.getMinVersion()) < 0)
pluginMenuItem.setText(pluginMenuItem.getText() + " (weka outdated)");
if (version.compareTo(plugin.getMaxVersion()) >= 0)
pluginMenuItem.setText(pluginMenuItem.getText() + " (plugin outdated)"); */