Merge pull request #532 from darki2002/Plugin_sim

Stopped to load plugins depending on simulations if there is no simulation
This commit is contained in:
Fredrik Österlind 2014-01-27 07:31:19 -08:00
commit f6c6ef9b54

View file

@ -963,7 +963,7 @@ public class Cooja extends Observable {
tooltip += description + " (" + newPluginClass.getName() + ")";
/* Check if simulation plugin depends on any particular radio medium */
if (pluginType == PluginType.SIM_PLUGIN || pluginType == PluginType.SIM_STANDARD_PLUGIN) {
if ((pluginType == PluginType.SIM_PLUGIN || pluginType == PluginType.SIM_STANDARD_PLUGIN) && (getSimulation() != null)) {
if (newPluginClass.getAnnotation(SupportedArguments.class) != null) {
boolean active = false;
Class<? extends RadioMedium>[] radioMediums = newPluginClass.getAnnotation(SupportedArguments.class).radioMediums();