synchronized void installGlobal(Debugger d) { if (disposed) { throw new IllegalArgumentException("Cannot install breakpoint, it is disposed already."); } if (this.debugger != null) { throw new IllegalStateException("Breakpoint is already installed in a Debugger instance."); } install(d); this.global = true; }
synchronized void installGlobal(Debugger d) { if (disposed) { throw new IllegalArgumentException("Cannot install breakpoint, it is disposed already."); } if (this.debugger != null) { throw new IllegalStateException("Breakpoint is already installed in a Debugger instance."); } install(d); this.global = true; }
synchronized void install(Breakpoint breakpoint, boolean global) { if (closed) { if (!global) { throw new IllegalStateException("Debugger session is already closed. Cannot install new breakpoints."); } else { return; } } if (!breakpoint.install(this, !global)) { return; } if (!global) { // Do not keep global breakpoints in the list this.breakpoints.add(breakpoint); } if (Debugger.TRACE) { trace("installed session breakpoint %s", breakpoint); } }
synchronized void install(Breakpoint breakpoint, boolean global) { if (closed) { if (!global) { throw new IllegalStateException("Debugger session is already closed. Cannot install new breakpoints."); } else { return; } } if (!breakpoint.install(this, !global)) { return; } if (!global) { // Do not keep global breakpoints in the list this.breakpoints.add(breakpoint); } if (Debugger.TRACE) { trace("installed session breakpoint %s", breakpoint); } }
synchronized boolean install(DebuggerSession d, boolean failOnError) { if (disposed) { if (failOnError) { throw new IllegalArgumentException("Cannot install breakpoint, it is disposed already."); } else { return false; } } if (this.sessions.contains(d)) { if (failOnError) { throw new IllegalStateException("Breakpoint is already installed in the session."); } else { return true; } } install(d.getDebugger()); this.sessions.add(d); sessionsAssumptionInvalidate(); if (enabled) { install(); } return true; }
synchronized boolean install(DebuggerSession d, boolean failOnError) { if (disposed) { if (failOnError) { throw new IllegalArgumentException("Cannot install breakpoint, it is disposed already."); } else { return false; } } if (this.sessions.contains(d)) { if (failOnError) { throw new IllegalStateException("Breakpoint is already installed in the session."); } else { return true; } } install(d.getDebugger()); this.sessions.add(d); sessionsAssumptionInvalidate(); if (enabled) { install(); } return true; }
/** * Controls whether this breakpoint is currently allowed to suspend execution (true by default). * This can be changed arbitrarily until breakpoint is {@linkplain #dispose() disposed}. * <p> * When not {@link #isModifiable() modifiable}, {@link IllegalStateException} is thrown. * * @param enabled whether this breakpoint should be allowed to suspend execution * * @since 0.9 */ public synchronized void setEnabled(boolean enabled) { if (disposed) { // cannot enable disposed breakpoints return; } if (this.enabled != enabled) { if (!sessions.isEmpty()) { if (enabled) { install(); } else { uninstall(); } } this.enabled = enabled; } }
/** * Controls whether this breakpoint is currently allowed to suspend execution (true by default). * This can be changed arbitrarily until breakpoint is {@linkplain #dispose() disposed}. * <p> * When not {@link #isModifiable() modifiable}, {@link IllegalStateException} is thrown. * * @param enabled whether this breakpoint should be allowed to suspend execution * * @since 0.9 */ public synchronized void setEnabled(boolean enabled) { if (disposed) { // cannot enable disposed breakpoints return; } if (this.enabled != enabled) { if (!sessions.isEmpty()) { if (enabled) { install(); } else { uninstall(); } } this.enabled = enabled; } }