1 22 23 package org.aspectj.debugger.request; 24 25 import org.aspectj.debugger.base.*; 26 27 import com.sun.jdi.*; 28 import java.util.*; 29 30 38 39 public class ContRequest extends Request { 40 public ContRequest (Debugger debugger) { 41 super(debugger); 42 } 43 44 public Object go() throws NoVMException, DebuggerException { 45 dbg().setStatus("Continuing..."); 46 printThreads(true); 47 dbg().resumeUntilZero(); 49 printThreads(false); 50 return null; 51 } 52 53 boolean printThreads = false; void printThreads(boolean before) { 55 try { 56 if (!printThreads) return; 57 Iterator threadIter = debugger.getVM().allThreads().iterator(); 58 System.out.print((before ? "BEFORE" : "AFTER") + ": "); 59 while (threadIter.hasNext()) { 60 ThreadReference threadRef = (ThreadReference) threadIter.next(); 61 System.out.print("(" + threadRef.uniqueID() + "):" + threadRef.suspendCount() + ", "); 62 } 63 System.out.println(); 64 } catch (NoVMException nvme) { 65 } 66 } 67 } 68 | Popular Tags |