1 22 23 package org.aspectj.debugger.request; 24 25 import org.aspectj.debugger.base.*; 26 27 import com.sun.jdi.*; 28 import com.sun.jdi.event.*; 29 import com.sun.jdi.request.*; 30 import java.util.*; 31 32 40 41 public class ClearAllRequest extends Request { 42 public ClearAllRequest(Debugger debugger) { 43 super(debugger); 44 } 45 46 public Object go() throws NoVMException, DebuggerException { 47 Iterator iter = debugger.getRequests().iterator(); 48 while (iter.hasNext()) { 49 Object o = iter.next(); 50 if (o instanceof BreakpointRequestAction) { 51 debugger.removeRequest((BreakpointRequestAction) o); 52 } 53 } 54 EventRequestManager em = vm().eventRequestManager(); 55 List breakpointRequests = em.breakpointRequests(); 56 iter = breakpointRequests.iterator(); 57 while (iter.hasNext()) { 58 BreakpointRequest br = (BreakpointRequest) iter.next(); 59 em.deleteEventRequest(br); 60 } 61 return breakpointRequests; 62 } 63 } 64 | Popular Tags |