diff --git a/tools/cooja/java/org/contikios/cooja/util/ExecuteJAR.java b/tools/cooja/java/org/contikios/cooja/util/ExecuteJAR.java index 9ba6bd01a..7946cfbd0 100644 --- a/tools/cooja/java/org/contikios/cooja/util/ExecuteJAR.java +++ b/tools/cooja/java/org/contikios/cooja/util/ExecuteJAR.java @@ -230,18 +230,18 @@ public class ExecuteJAR { logger.info("Checking mote types: '" + Cooja.getDescriptionOf(t.getClass()) + "'"); } - /* Check dependencies: Contiki Test Editor */ - boolean hasTestEditor = false; - for (Plugin startedPlugin : gui.getStartedPlugins()) { - if (startedPlugin instanceof ScriptRunner) { - hasTestEditor = true; - break; - } + /* Check dependencies: Contiki Control Plugin */ + boolean hasController = false; + for (Plugin startedPlugin : gui.startedPlugins) { + int pluginType = startedPlugin.getClass().getAnnotation(PluginType.class).value(); + if (pluginType == PluginType.SIM_CONTROL_PLUGIN) { + hasController = true; + } } - logger.info("Checking that Contiki Test Editor exists: " + hasTestEditor); - if (!hasTestEditor) { + logger.info("Checking that Contiki Control Plugin exists: " + hasController); + if (!hasController) { throw new RuntimeException( - "The simulation needs at least one active Contiki Test Editor plugin.\n" + + "The simulation needs at least one active control plugin.\n" + "The plugin is needed to control the non-visualized simulation." ); }