/*
 * Arthur Edelstein, UCSF, 2011
 */

package org.micromanager.clojureeditor;

import org.micromanager.api.MMPlugin;
import org.micromanager.api.ScriptInterface;

public class ClojureEditorPlugin implements MMPlugin {
   public static final String menuName = "Clojure editor";
   public static final String tooltipDescription =
      "Clojure script editor and REPL";
   
   public void dispose() {
      // do nothing
   }

   public void setApp(ScriptInterface app) {
      // do nothing.
   }

   public void show() {
      clooj.core.show();
   }

   public void configurationChanged() {
      throw new UnsupportedOperationException("Not supported yet.");
   }

   public String getDescription() {
      return tooltipDescription;
   }

   public String getInfo() {
      throw new UnsupportedOperationException("Not supported yet.");
   }

   public String getVersion() {
      throw new UnsupportedOperationException("Not supported yet.");
   }

   public String getCopyright() {
      throw new UnsupportedOperationException("Not supported yet.");
   }

}


@@ -526,26 +526,618 @@
     
-clooj.core.show();
+// The current thread's context class loader must be set for Clojure%0A      // class to load. We don't want to globally set the EDT's context class%0A      // loader, so let's spawn a new thread on which Clooj is loaded.%0A%0A      Thread loadingThread = new Thread() %7B%0A         @Override public void run() %7B%0A            clooj.core.show();%0A         %7D%0A      %7D;%0A%0A      loadingThread.setContextClassLoader(getClass().getClassLoader());%0A%0A      loadingThread.start();%0A%0A      try %7B%0A         loadingThread.join();%0A      %7D%0A      catch (InterruptedException ignore) %7B%0A         // Nobody should be interrupting the EDT.%0A      %7D
 %0A   

Fix plugin loading