@Override public void breakpointRemoved(final IBreakpoint breakpoint, final IMarkerDelta delta) { if (!target.supportsBreakpoint(breakpoint)) { return; } final IDbgpSession[] sessions = getSessions(); for (int i = 0; i < sessions.length; ++i) { final IDbgpSession session = sessions[i]; scheduleBackgroundOperation( target, new Runnable() { @Override public void run() { try { if (breakpoint instanceof IScriptSpawnpoint) { removeSpawnpoint(session, (IScriptSpawnpoint) breakpoint); } else { removeBreakpoint(session, (IScriptBreakpoint) breakpoint); } } catch (Exception e) { DLTKDebugPlugin.log(e); } } }); } }
/** * @see IBreakpointListener#breakpointChanged(IBreakpoint, IMarkerDelta) * @param breakpoint * @param delta if delta is <code>null</code> then there was a call to * BreakPointManager.fireBreakpointChanged(IBreakpoint breakpoint), so see it as a major * change. */ @Override public void breakpointChanged(final IBreakpoint breakpoint, final IMarkerDelta delta) { if (!target.supportsBreakpoint(breakpoint)) { return; } if (breakpoint instanceof IScriptSpawnpoint) { final int changes = delta != null ? hasSpawnpointChanges(delta, (IScriptSpawnpoint) breakpoint) : MAJOR_CHANGE; if (changes != NO_CHANGES) { final IDbgpSession[] sessions = getSessions(); for (int i = 0; i < sessions.length; ++i) { final IDbgpSession session = sessions[i]; scheduleBackgroundOperation( target, new Runnable() { @Override public void run() { try { if (changes == MAJOR_CHANGE) { removeSpawnpoint(session, (IScriptSpawnpoint) breakpoint); addSpawnpoint(session, (IScriptSpawnpoint) breakpoint); } else { changeSpawnpoint(session, (IScriptSpawnpoint) breakpoint); } } catch (Exception e) { DLTKDebugPlugin.logError(e.getMessage(), e); } } }); } } } else { final IScriptBreakpoint sbp = (IScriptBreakpoint) breakpoint; final int changes = delta != null ? hasBreakpointChanges(delta, sbp) : MAJOR_CHANGE; if (changes != NO_CHANGES) { final IDbgpSession[] sessions = getSessions(); for (int i = 0; i < sessions.length; ++i) { final IDbgpSession session = sessions[i]; scheduleBackgroundOperation( target, new Runnable() { @Override public void run() { try { if (changes == MAJOR_CHANGE) { removeBreakpoint(session, sbp); addBreakpoint(session, sbp); } else { changeBreakpoint(session, sbp); } } catch (Exception e) { DLTKDebugPlugin.logError(e.getMessage(), e); } } }); } } } }
public boolean supportsBreakpoint(IBreakpoint breakpoint) { return target.supportsBreakpoint(breakpoint); }