@Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getNewValue() == null) { // Ignore resume. return ; } logger.fine("Current frame changed>"); if (!isNotifyInvoke) { for (MethodBreakpoint mb : scriptAccessBPs) { logger.log(Level.FINE, " {0} disable", mb); mb.disable(); } } logger.log(Level.FINE, " {0} disable", notifyInvokeBP); notifyInvokeBP.disable(); } }
@Override protected void destroy() { logger.fine("\nStepIntoJSHandler.destroy()"); if (!isNotifyInvoke) { for (MethodBreakpoint mb : scriptAccessBPs) { logger.log(Level.FINE, "{0} disable", mb); mb.disable(); DebuggerManager.getDebuggerManager().removeBreakpoint(mb); } } logger.log(Level.FINE, "{0} disable", notifyInvokeBP); notifyInvokeBP.disable(); DebuggerManager.getDebuggerManager().removeBreakpoint(notifyInvokeBP); }
@Override public void propertyChange(PropertyChangeEvent evt) { if (Breakpoint.VALIDITY.VALID.equals(notifyInvokeBP.getValidity())) { // notifyInvoke is available we can remove the script access breakpoints logger.log(Level.FINE, "{0} is valid => we can disable breakpoints on "+SCRIPT_ACCESS_CLASS, notifyInvokeBP); for (MethodBreakpoint mb : scriptAccessBPs) { logger.log(Level.FINE, "{0} disable", mb); mb.disable(); DebuggerManager.getDebuggerManager().removeBreakpoint(mb); } isNotifyInvoke = true; } } });
@Override public void breakpointReached(JPDABreakpointEvent event) { logger.log(Level.FINE, "InScriptBPListener.breakpointReached(), removing {0}", mb); mb.disable(); mb.removeJPDABreakpointListener(this); DebuggerManager.getDebuggerManager().removeBreakpoint(mb); // We're in the script. // Disable any pending step requests: disableStepRequests(event.getThread()); }
mb.setSuspend(debugger.getSuspend()); mb.setSession(debugger); mb.disable(); mb.addJPDABreakpointListener(sbl); DebuggerManager.getDebuggerManager().addBreakpoint(mb); notifyInvokeBP.setSuspend(debugger.getSuspend()); notifyInvokeBP.setSession(debugger); notifyInvokeBP.disable(); notifyInvokeBP.addJPDABreakpointListener(sibl); DebuggerManager.getDebuggerManager().addBreakpoint(notifyInvokeBP);