コード例 #1
0
  /**
   * Adds the breakpoints associated with a container.
   *
   * @param container the container we're interested in (usually workspace root)
   */
  private void addBreakpointsFor(IContainer container) {
    try {
      IMarker[] markers =
          container.findMarkers(PyBreakpoint.PY_BREAK_MARKER, true, IResource.DEPTH_INFINITE);
      IMarker[] condMarkers =
          container.findMarkers(
              PyBreakpoint.PY_CONDITIONAL_BREAK_MARKER, true, IResource.DEPTH_INFINITE);
      IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();

      for (IMarker marker : markers) {
        PyBreakpoint brk = (PyBreakpoint) breakpointManager.getBreakpoint(marker);
        breakpointAdded(brk);
      }

      for (IMarker marker : condMarkers) {
        PyBreakpoint brk = (PyBreakpoint) breakpointManager.getBreakpoint(marker);
        breakpointAdded(brk);
      }
    } catch (Throwable t) {
      PydevDebugPlugin.errorDialog("Error setting breakpoints", t);
    }
  }
コード例 #2
0
 /**
  * Called when a breakpoint is changed. E.g.: - When line numbers change in the file - When the
  * manager decides to enable/disable all existing markers - When the breakpoint properties (hit
  * condition) are edited
  */
 public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
   if (breakpoint instanceof PyBreakpoint) {
     breakpointRemoved(breakpoint, null);
     breakpointAdded(breakpoint);
   }
 }