@Override public void breakpointsRemoved( final Set<com.google.security.zynamics.binnavi.debug.models.breakpoints.Breakpoint> breakpoints) { Preconditions.checkNotNull(breakpoints, "Error: breakpoints argument can not be null"); if (breakpoints.size() == 0) { return; } for (final com.google.security.zynamics.binnavi.debug.models.breakpoints.Breakpoint breakpoint : breakpoints) { if (breakpoint.getType() == BreakpointType.REGULAR) { final Breakpoint removedBreakpoint = breakpointMap.get(breakpoint); breakpointMap.remove(breakpoint); for (final IBreakpointManagerListener listener : listeners) { try { listener.removedBreakpoint(BreakpointManager.this, removedBreakpoint); } catch (final Exception exception) { CUtilityFunctions.logException(exception); } } } else if (breakpoint.getType() == BreakpointType.ECHO) { final Breakpoint removedBreakpoint = echoBreakpointMap.get(breakpoint); echoBreakpointMap.remove(breakpoint); for (final IBreakpointManagerListener listener : listeners) { try { listener.removedEchoBreakpoint(BreakpointManager.this, removedBreakpoint); } catch (final Exception exception) { CUtilityFunctions.logException(exception); } } } } }
@Override public void breakpointsAdded( final List<com.google.security.zynamics.binnavi.debug.models.breakpoints.Breakpoint> breakpoints) { for (final com.google.security.zynamics.binnavi.debug.models.breakpoints.Breakpoint breakpoint : breakpoints) { final Breakpoint newBreakpoint = new Breakpoint(breakpoint); if (breakpoint.getType() == BreakpointType.REGULAR) { breakpointMap.put(breakpoint, newBreakpoint); for (final IBreakpointManagerListener listener : listeners) { try { listener.addedBreakpoint(BreakpointManager.this, newBreakpoint); } catch (final Exception exception) { CUtilityFunctions.logException(exception); } } } else if (breakpoint.getType() == BreakpointType.ECHO) { echoBreakpointMap.put(breakpoint, newBreakpoint); for (final IBreakpointManagerListener listener : listeners) { try { listener.addedEchoBreakpoint(BreakpointManager.this, newBreakpoint); } catch (final Exception exception) { CUtilityFunctions.logException(exception); } } } } }