public void buildMenu() {
    logger.info("Building plugin menu");
    menu.removeAll();
    for (String name : constructors.keySet()) {
      JMenuItem mi = new JMenuItem(name);
      // ActionCommand contains the name of the plugin = key in the map
      mi.setActionCommand(name);
      mi.addActionListener(listener);
      menu.add(mi);
    }
  }