/** Constructor, setting the home directory. */
 public TestLearningAPI(String arg0) throws GateException, MalformedURLException {
   super(arg0);
   if (!initialized) {
     Gate.init();
     learningHome = new File(new File(Gate.getGateHome(), "plugins"), "Learning");
     Gate.getCreoleRegister().addDirectory(learningHome.toURI().toURL());
     initialized = true;
   }
 }
 public RuleBaseViewer() {
   super();
   String pluginPath = "";
   try {
     File pluginDir = new File(Gate.getGateHome().toString() + "/plugins/Semano/");
     pluginPath = pluginDir.getAbsoluteFile().toURI().toURL().toString();
     if (pluginPath != null) {
       pluginPath = pluginPath.substring(5, pluginPath.length());
       System.out.println("plugin directory: " + pluginPath);
     }
     editURL = new File(pluginPath + "pencil.gif").toURI().toURL();
     deleteURL = new File(pluginPath + "delete.gif").toURI().toURL();
     System.out.println("loading icons from " + editURL.toString());
   } catch (MalformedURLException e) {
     // this should never be reached!
     System.err.println("icons not found!");
   }
 }