package io.reactors
package debugger



import io.reactors.common.UnrolledRing
import java.util.concurrent.atomic.AtomicLong
import scala.collection._



class BreakpointDebugger(val system: ReactorSystem, val deltaDebugger: DeltaDebugger)
extends DebugApi {
  import BreakpointDebugger.Breakpoint

  private val monitor = system.monitor
  private val bidCounter = new AtomicLong
  private val breakpoints = mutable.Map[Long, Breakpoint]()

  def isEnabled = true

  def eventSent[@spec(Int, Long, Double) T](c: Channel[T], x: T) {
  }

  def eventDelivered[@spec(Int, Long, Double) T](c: Channel[T], x: T) {
  }

  def reactorStarted(r: Reactor[_]) {
  }

  def reactorScheduled(r: Reactor[_]) {
  }

  def reactorPreempted(r: Reactor[_]) {
  }

  def reactorDied(r: Reactor[_]) {
  }

  def reactorTerminated(r: Reactor[_]) {
  }

  def connectorOpened[T](c: Connector[T]) {
  }

  def connectorSealed[T](c: Connector[T]) {
  }

  def log(x: Any) {
  }

  def breakpointAdd(pattern: String, tpe: String): Long =
    monitor.synchronized {
      val bid = bidCounter.getAndIncrement()
      val b = new Breakpoint(bid)
      breakpoints(bid) = b
      bid
    }

  def breakpointList(): List[Breakpoint] = monitor.synchronized {
    breakpoints.values.toList
  }

  def breakpointRemove(bid: Long): Option[Breakpoint] = monitor.synchronized {
    breakpoints.remove(bid)
  }
}


object BreakpointDebugger {
  class Breakpoint(val bid: Long, val pattern: String, val tpes: String)
}

package io.reactors
package debugger



import io.reactors.common.UnrolledRing



class BreakpointDebugger(val system: ReactorSystem, val deltaDebugger: DeltaDebugger)
extends DebugApi {
  private val monitor = system.monitor

  def isEnabled = true

  def eventSent[@spec(Int, Long, Double) T](c: Channel[T], x: T) {
  }

  def eventDelivered[@spec(Int, Long, Double) T](c: Channel[T], x: T) {
  }

  def reactorStarted(r: Reactor[_]) {
  }

  def reactorScheduled(r: Reactor[_]) {
  }

  def reactorPreempted(r: Reactor[_]) {
  }

  def reactorDied(r: Reactor[_]) {
  }

  def reactorTerminated(r: Reactor[_]) {
  }

  def connectorOpened[T](c: Connector[T]) {
  }

  def connectorSealed[T](c: Connector[T]) {
  }

  def log(x: Any) {
  }
}

--- 
+++ 
@@ -4,12 +4,18 @@
 
 
 import io.reactors.common.UnrolledRing
+import java.util.concurrent.atomic.AtomicLong
+import scala.collection._
 
 
 
 class BreakpointDebugger(val system: ReactorSystem, val deltaDebugger: DeltaDebugger)
 extends DebugApi {
+  import BreakpointDebugger.Breakpoint
+
   private val monitor = system.monitor
+  private val bidCounter = new AtomicLong
+  private val breakpoints = mutable.Map[Long, Breakpoint]()
 
   def isEnabled = true
 
@@ -42,4 +48,25 @@
 
   def log(x: Any) {
   }
+
+  def breakpointAdd(pattern: String, tpe: String): Long =
+    monitor.synchronized {
+      val bid = bidCounter.getAndIncrement()
+      val b = new Breakpoint(bid)
+      breakpoints(bid) = b
+      bid
+    }
+
+  def breakpointList(): List[Breakpoint] = monitor.synchronized {
+    breakpoints.values.toList
+  }
+
+  def breakpointRemove(bid: Long): Option[Breakpoint] = monitor.synchronized {
+    breakpoints.remove(bid)
+  }
 }
+
+
+object BreakpointDebugger {
+  class Breakpoint(val bid: Long, val pattern: String, val tpes: String)
+}
Add breakpoint-related methods to debugger