// if (plugin == this)
// return false;
PluginView pluginView = new PluginView(plugin);
Plugin storedPlugin = idToPluginMap.get(pluginView.getId());
if (storedPlugin != plugin) {
if (storedPlugin == null) {
idToPluginMap.put(pluginView.getId(), plugin);
idToViewMap.put(pluginView.getId(), pluginView);
configurator.add(pluginView);
trayMenu.add(pluginView);
} else {
throw new IllegalPluginException("plugin '"+plugin.getName()+"' registered as v"+plugin.getVersion()+" and v"+storedPlugin.getVersion());
}
}
return (pluginView.isConfigurable() || pluginView.hasPresentation());
}