Commits

Anonymous committed af3db1a

Added some documentation and fixed memory leak.

Comments (0)

Files changed (3)

src/org/lispdev/swank/ISwank.java

 package org.lispdev.swank;
 
+/**
+ * Swank interface - performs communication with swank running on a lisp.
+ */
 public interface ISwank
 {
+  /**
+   * connect to a swank server
+   */
   void connect();
+  /**
+   * disconnect from a swank server (also usually terminates lisp)
+   */
   void disconnect();
+  /**
+   * @return true if connected to a swank server
+   */
   boolean isConnected();
+  /**
+   * Add a listener to a particular swank event
+   */
   void addListener(SwankEvent e, SwankRunnable r);
-  void removeListener(SwankEvent e, SwankRunnable r);
+  /**
+   * Remove listener
+   */
   void removeListener(SwankRunnable r);
+  /**
+   * @return Lisp and slime version
+   */
   String getLispVersion();
   void sendEval(String message, SwankRunnable callBack);
   void sendReadString(String input, SwankRunnable callBack,
   String getCurrPackage();
   void sendDebug(String commandNum, String sldbLevel,
       String threadId, SwankRunnable callBack);
+  void sendListThreads(SwankRunnable callBack);
 }

src/org/lispdev/swank/LispDebugTarget.java

 package org.lispdev.swank;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.eclipse.core.resources.IMarkerDelta;
 import org.eclipse.debug.core.DebugException;
 import org.eclipse.debug.core.ILaunch;
 {
   private final ILaunch launch;
   private final LispProcess process;
-  private final IThread[] threads;
+  private final List<IThread> threads = new ArrayList<IThread>();
   private final LispThread thread;
   private boolean terminated = false;
 
     this.launch = launch;
     this.process = process;
     thread = new LispThread(this);
-    threads = new IThread[] {thread};
+    threads.add(thread);
   }
 
   @Override
   @Override
   public IThread[] getThreads() throws DebugException
   {
-    return threads;
+    //process.getSwank()
+    return threads.toArray(new IThread[threads.size()]);
   }
 
   public LispThread getMainThread()

src/org/lispdev/swank/LispStackFrame.java

   @Override
   public IRegisterGroup[] getRegisterGroups() throws DebugException
   {
-    return null;
+    return new IRegisterGroup[0];
   }
 
   @Override