From 8ea9c8aa74533acda102868a2cd55ad030b0f7ef Mon Sep 17 00:00:00 2001 From: apvrille <ludovic.apvrille@eurecom.fr> Date: Tue, 4 Jul 2017 11:16:36 +0200 Subject: [PATCH] Update on config.xml --- src/main/java/common/ConfigurationTTool.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/main/java/common/ConfigurationTTool.java b/src/main/java/common/ConfigurationTTool.java index f270e90367..4fa1b7fa9d 100755 --- a/src/main/java/common/ConfigurationTTool.java +++ b/src/main/java/common/ConfigurationTTool.java @@ -151,6 +151,7 @@ public class ConfigurationTTool { // PLUGINS public static String PLUGIN_PATH = ""; + public static String[] PLUGIN = new String[0]; public static String PLUGIN_JAVA_CODE_GENERATOR = ""; public static String[] PLUGIN_GRAPHICAL_COMPONENT = new String[0]; @@ -461,6 +462,9 @@ public class ConfigurationTTool { for (int i=0; i<PLUGIN_GRAPHICAL_COMPONENT.length; i++) { sb.append("Plugin for graphical component: " + PLUGIN_GRAPHICAL_COMPONENT[i] + "\n"); } + for (int i=0; i<PLUGIN.length; i++) { + sb.append("Multi purpose plugin: " + PLUGIN[i] + "\n"); + } // URL sb.append("\nURLs:\n"); @@ -744,6 +748,10 @@ public class ConfigurationTTool { if (nl.getLength() > 0) PluginPath(nl); + nl = doc.getElementsByTagName("PLUGIN"); + if (nl.getLength() > 0) + Plugin(nl); + nl = doc.getElementsByTagName("PLUGIN_JAVA_CODE_GENERATOR"); if (nl.getLength() > 0) PluginJavaCodeGenerator(nl); @@ -1440,6 +1448,18 @@ public class ConfigurationTTool { } } + private static void Plugin(NodeList nl) throws MalformedConfigurationException { + PLUGIN = new String[nl.getLength()]; + try { + for (int i=0; i<nl.getLength(); i++) { + Element elt = (Element)(nl.item(i)); + PLUGIN[i] = elt.getAttribute("data"); + } + } catch (Exception e) { + throw new MalformedConfigurationException(e.getMessage()); + } + } + private static void PluginJavaCodeGenerator(NodeList nl) throws MalformedConfigurationException { try { Element elt = (Element)(nl.item(0)); -- GitLab