scala-ide/scala-ide — pull request #431 by dotta (2013-06-03 14:20:19+00:00)
Title: [backport] Implemented `skipAllBreakpoints` for the Scala Debugger

The Scala debugger now reacts consistently to `skipAllBreakpoints` requests,
which can be triggered by users from the Debugger UI.

The enabled state of a breakpoint does now depend not just on the breakpoint
state, but also on the `BreakpointManager` state, which can be queried to know
if breakpoints should be ignored during a running debug session. When a user
hit the `skipAllBreakpoint` button in the UI, the `BreakpointManager`'s
isEnabled state is set to false, entailing that any enabled breakpoint should
be ignored.

Prior to this commit, we used to store in the breakpoint's marker a flag to
know if the `eventRequests` associated to the breakpoint were (or will, if
lazily loaded) enabled. However, using the breakpoint's marker for keeping
track of this information isn't safe, because markers can be shared across
multiple debug sessions. Now, this information is stored in the
`BreakpointSupport` actor.

Unfortunately, the above change made testing more difficult, as we need a way
to inspect the the `BreakpointSupport`'s requests state. At the moment, the
simplest solution was to add a new message `GetBreakpointRequestState` which
can be used to retrieve this information in tests. Considering we plan to
move away from actor, the tradeoff seems reasonable.

Fix #1001437
(cherry picked from commit eb47006594199a1fc6a16497323946105ed84fde)