Index: /trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java
===================================================================
--- /trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java	(revision 12636)
+++ /trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java	(revision 12637)
@@ -137,5 +137,6 @@
 	    StringBuffer xml = null;
 	    if (Gatherer.isGsdlRemote) {
-		// !! TO DO
+		String classinfo_output = RemoteGreenstoneServer.getScriptOptions("classinfo.pl", "&classifier=" + classifier);
+		xml = new StringBuffer(classinfo_output);
 	    }
 	    else {
@@ -563,43 +564,50 @@
 	}
 
-	/** This class listens for actions upon the add button in the controls, and if detected calls the assignClassifier() method.
-	 */
+
 	private class AddListener
-	    implements ActionListener {
-	    /** Any implementation of ActionListener must include this method so that we can be informed when an action has occured on one of our target controls, so that we can add the selected Classifier.
-	     * @param event An <strong>ActionEvent</strong> containing information garnered from the control action.
-	     * @see org.greenstone.gatherer.Gatherer
-	     * @see org.greenstone.gatherer.cdm.ArgumentConfiguration
-	     * @see org.greenstone.gatherer.cdm.Classifier
-	     */
-	    public void actionPerformed(ActionEvent event) {
-		Object selected_object = classifier_combobox.getSelectedItem();
-		// If there is something in the combobox, but we haven't registered a selection, then add the object and select it!
-		if(selected_object != null) {
-		    // Retrieve the base classifier
-		    Classifier base_classifier = getClassifier(selected_object.toString(), true);
-
-		    // Create a new element in the DOM
-		    Element element = CollectionDesignManager.collect_config.document.createElement(CollectionConfiguration.CLASSIFY_ELEMENT);
-		    element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, base_classifier.getName());
-		    Classifier new_classifier = new Classifier(element, base_classifier);
-		    
-		    element = null;
-		    // Automatically chain to configuration. This ensures required arguments are filled out.
-		    ArgumentConfiguration ac = new ArgumentConfiguration(new_classifier);
-		    if(ac.display()) {
-			if(!model.contains(new_classifier)) {
-			    assignClassifier(new_classifier);
-			    classifier_list.setSelectedValue(new_classifier, true);
-			}
-			else {
-			    JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.ClassifierManager.Classifier_Exists"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE);
-			}
-		    }
-		    ac = null;
-		    new_classifier = null;
-		}
-	    }
-	}
+	    implements ActionListener
+	{
+	    public void actionPerformed(ActionEvent event)
+	    {
+		if (classifier_combobox.getSelectedItem() != null) {
+		    // This must be done on a new thread for the remote building code
+		    new AddClassifierTask(classifier_combobox.getSelectedItem().toString()).start();
+		}
+	    }
+	}
+
+
+	private class AddClassifierTask
+	    extends Thread
+	{
+	    private String classifier_name;
+
+	    public AddClassifierTask(String classifier_name)
+	    {
+		this.classifier_name = classifier_name;
+	    }
+
+	    public void run()
+	    {
+		// Retrieve the classifier
+		Classifier classifier = getClassifier(classifier_name, true);
+		if (classifier == null) {
+		    System.err.println("Error: getClassifier() returned null.");
+		    return;
+		}
+
+		// Create a new element in the DOM
+		Element new_classifier_element = CollectionDesignManager.collect_config.document.createElement(CollectionConfiguration.CLASSIFY_ELEMENT);
+		new_classifier_element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, classifier.getName());
+		Classifier new_classifier = new Classifier(new_classifier_element, classifier);
+
+		ArgumentConfiguration ac = new ArgumentConfiguration(new_classifier);
+		if (ac.display()) {
+		    assignClassifier(new_classifier);
+		    classifier_list.setSelectedValue(new_classifier, true);
+		}
+	    }
+	}
+
 
     /** This listener reacts to changes in the current selection of the classifier combobox. */
Index: /trunk/gli/src/org/greenstone/gatherer/cdm/Plugin.java
===================================================================
--- /trunk/gli/src/org/greenstone/gatherer/cdm/Plugin.java	(revision 12636)
+++ /trunk/gli/src/org/greenstone/gatherer/cdm/Plugin.java	(revision 12637)
@@ -85,5 +85,5 @@
     public boolean doesExplodeMetadataDatabases()
     {
-	Plugin base_plugin = CollectionDesignManager.plugin_manager.getPlugin(getName(), false);
+	Plugin base_plugin = PluginManager.getPlugin(getName(), false);
 	if (base_plugin == null) {
 	    return false;
Index: /trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java
===================================================================
--- /trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java	(revision 12636)
+++ /trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java	(revision 12637)
@@ -179,5 +179,6 @@
 	    StringBuffer xml = null;
 	    if (Gatherer.isGsdlRemote) {
-		// !! TO DO
+		String pluginfo_output = RemoteGreenstoneServer.getScriptOptions("pluginfo.pl", "&plugin=" + plugin);
+		xml = new StringBuffer(pluginfo_output);
 	    }
 	    else {
@@ -735,43 +736,56 @@
 	}
 
-	/** This class listens for actions upon the add button in the controls, and if detected calls the <i>assignPlugin()</i> method. */
+
 	private class AddListener
-	    implements ActionListener {
-	    /** Any implementation of <i>ActionListener</i> must include this method so that we can be informed when an action has occured on one of our target controls.
-	     * @param event An <strong>ActionEvent</strong> containing information garnered from the control action.
-	     */
-	    public void actionPerformed(ActionEvent event) {
-		Object selected_object = plugin_combobox.getSelectedItem();
-		if(selected_object != null) {
-		    // Retrieve the base plugin 
-		    Plugin base_plugin = getPlugin(selected_object.toString(), true);
-		    if (base_plugin == null) {
-			// shouldn't happen
-			return;
-		    }
-		    
-		    // Create a new element in the DOM
-		    Element element = CollectionDesignManager.collect_config.document.createElement(CollectionConfiguration.PLUGIN_ELEMENT);
-		    element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, base_plugin.getName());
-		    Plugin new_plugin = new Plugin(element, base_plugin);
-		    element = null;
-		    
-		    // Automatically chain to configuration. This ensures required arguments are filled out.
-		    ArgumentConfiguration ac = new ArgumentConfiguration(new_plugin);
-		    if(ac.display()) {
-			assignPlugin(new_plugin);
-			plugin_list.setSelectedValue(new_plugin, true);
-			// Since we weren't cancelled, if we are in a low mode, remove the plugin from the available list (except for UnknownPlug
-			if(Configuration.getMode() <= Configuration.SYSTEMS_MODE && !base_plugin.getName().equals(StaticStrings.UNKNOWNPLUG_STR)) {
-			    plugin_combobox.removeItem(base_plugin);
-			    plugin_combobox.setSelectedIndex(0);
-			}
-		    }
-		    ac = null;
-		    new_plugin = null;
-		    base_plugin = null;
-		}
-	    }
-	}
+	    implements ActionListener
+	{
+	    public void actionPerformed(ActionEvent event)
+	    {
+		if (plugin_combobox.getSelectedItem() != null) {
+		    // This must be done on a new thread for the remote building code
+		    new AddPluginTask(plugin_combobox.getSelectedItem().toString()).start();
+		}
+	    }
+	}
+
+
+	private class AddPluginTask
+	    extends Thread
+	{
+	    private String plugin_name;
+
+	    public AddPluginTask(String plugin_name)
+	    {
+		this.plugin_name = plugin_name;
+	    }
+
+	    public void run()
+	    {
+		// Retrieve the plugin
+		Plugin plugin = getPlugin(plugin_name, true);
+		if (plugin == null) {
+		    System.err.println("Error: getPlugin() returned null.");
+		    return;
+		}
+
+		// Create a new element in the DOM
+		Element new_plugin_element = CollectionDesignManager.collect_config.document.createElement(CollectionConfiguration.PLUGIN_ELEMENT);
+		new_plugin_element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, plugin.getName());
+		Plugin new_plugin = new Plugin(new_plugin_element, plugin);
+
+		ArgumentConfiguration ac = new ArgumentConfiguration(new_plugin);
+		if (ac.display()) {
+		    assignPlugin(new_plugin);
+		    plugin_list.setSelectedValue(new_plugin, true);
+
+		    // Remove the plugin from the available list (unless we're in a high mode, or it's UnknownPlug)
+		    if (Configuration.getMode() <= Configuration.SYSTEMS_MODE && !plugin_name.equals(StaticStrings.UNKNOWNPLUG_STR)) {
+			plugin_combobox.removeItem(plugin);
+			plugin_combobox.setSelectedIndex(0);
+		    }
+		}
+	    }
+	}
+
 
 	/** Listens for double clicks apon the list and react as if the configure button was pushed. */
@@ -1090,26 +1104,44 @@
 	}
 
-	public void actionPerformed(ActionEvent event) {
-	    
-	    if(event.getSource() == add_button) {
-		// add the selected plugin to the list
-		Object selected_object = suitable_plugins_combobox.getSelectedItem();
-		Plugin base_plugin = getPlugin(selected_object.toString(), true);
-		if (base_plugin == null) {
-		    // shouldn't happen - we are not allowed custom plugins anymore
-		    setVisible(false);
-		    return;
-		}
-		// Create a new element in the DOM
-		Element element = CollectionDesignManager.collect_config.document.createElement(CollectionConfiguration.PLUGIN_ELEMENT);
-		element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, base_plugin.getName());
-		Plugin new_plugin = new Plugin(element, base_plugin);
-		assignPlugin(new_plugin);
-	    } // else do nothing
-	    
-	    // close the dialog
+
+	public void actionPerformed(ActionEvent event)
+	{
+	    // Close the dialog
 	    setVisible(false);
-	}
-
+
+	    if (event.getSource() == add_button) {
+		new AddPluginTask(suitable_plugins_combobox.getSelectedItem().toString()).start();
+	    }
+	}
+    }
+
+
+    private class AddPluginTask
+	extends Thread
+    {
+	private String plugin_name;
+
+	public AddPluginTask(String plugin_name)
+	{
+	    this.plugin_name = plugin_name;
+	}
+
+	public void run()
+	{
+	    // Retrieve the plugin
+	    Plugin plugin = getPlugin(plugin_name, true);
+	    if (plugin == null) {
+		System.err.println("Error: getPlugin() returned null.");
+		return;
+	    }
+
+	    // Create a new element in the DOM
+	    Element new_plugin_element = CollectionDesignManager.collect_config.document.createElement(CollectionConfiguration.PLUGIN_ELEMENT);
+	    new_plugin_element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, plugin.getName());
+	    Plugin new_plugin = new Plugin(new_plugin_element, plugin);
+
+	    // Just assign the plugin with no argument configuration
+	    assignPlugin(new_plugin);
+	}
     }
 
