646 } |
646 } |
647 |
647 |
648 return bpsInfo.toArray(new PlatformBreakpointInfo[bpsInfo.size()]); |
648 return bpsInfo.toArray(new PlatformBreakpointInfo[bpsInfo.size()]); |
649 } |
649 } |
650 |
650 |
651 protected void doBreakpointsAddedInExecutor(PlatformBreakpointInfo[] bpsInfo, Collection<IBreakpointsTargetDMContext> bpTargetDMCs, RequestMonitor rm) { |
651 protected void doBreakpointsAddedInExecutor(PlatformBreakpointInfo[] bpsInfo, Collection<IBreakpointsTargetDMContext> bpTargetDMCs, final RequestMonitor rm) { |
652 final Map<IBreakpoint, Map<IBreakpointsTargetDMContext, ITargetBreakpointInfo[]>> eventBPs = |
652 final Map<IBreakpoint, Map<IBreakpointsTargetDMContext, ITargetBreakpointInfo[]>> eventBPs = |
653 new HashMap<IBreakpoint, Map<IBreakpointsTargetDMContext, ITargetBreakpointInfo[]>>(bpsInfo.length, 1); |
653 new HashMap<IBreakpoint, Map<IBreakpointsTargetDMContext, ITargetBreakpointInfo[]>>(bpsInfo.length, 1); |
654 |
654 |
655 CountingRequestMonitor processPendingCountingRm = new CountingRequestMonitor(getExecutor(), rm) { |
655 CountingRequestMonitor processPendingCountingRm = new CountingRequestMonitor(getExecutor(), rm) { |
656 @Override |
656 @Override |
657 protected void handleCompleted() { |
657 protected void handleCompleted() { |
658 processPendingRequests(); |
658 processPendingRequests(); |
659 fireUpdateBreakpointsStatus(eventBPs, BreakpointEventType.ADDED); |
659 fireUpdateBreakpointsStatus(eventBPs, BreakpointEventType.ADDED); |
660 super.handleCompleted(); |
660 if (rm != null) |
|
661 // don't call this if "rm" is null as this will |
|
662 // log errors if any and pack Eclipse error |
|
663 // log view with errors useless to user. |
|
664 super.handleCompleted(); |
661 } |
665 } |
662 }; |
666 }; |
663 int processPendingCountingRmCount = 0; |
667 int processPendingCountingRmCount = 0; |
664 |
668 |
665 for (final PlatformBreakpointInfo bpinfo : bpsInfo) { |
669 for (final PlatformBreakpointInfo bpinfo : bpsInfo) { |
934 } |
938 } |
935 } |
939 } |
936 } |
940 } |
937 |
941 |
938 protected void doBreakpointsRemovedInExecutor(IBreakpoint[] bpCandidates, |
942 protected void doBreakpointsRemovedInExecutor(IBreakpoint[] bpCandidates, |
939 Collection<IBreakpointsTargetDMContext> targetContexts, RequestMonitor rm) { |
943 Collection<IBreakpointsTargetDMContext> targetContexts, final RequestMonitor rm) { |
940 |
944 |
941 final Map<IBreakpoint, Map<IBreakpointsTargetDMContext, ITargetBreakpointInfo[]>> eventBPs = |
945 final Map<IBreakpoint, Map<IBreakpointsTargetDMContext, ITargetBreakpointInfo[]>> eventBPs = |
942 new HashMap<IBreakpoint, Map<IBreakpointsTargetDMContext, ITargetBreakpointInfo[]>>(bpCandidates.length, 1); |
946 new HashMap<IBreakpoint, Map<IBreakpointsTargetDMContext, ITargetBreakpointInfo[]>>(bpCandidates.length, 1); |
943 |
947 |
944 CountingRequestMonitor processPendingCountingRm = new CountingRequestMonitor(getExecutor(), rm) { |
948 CountingRequestMonitor processPendingCountingRm = new CountingRequestMonitor(getExecutor(), rm) { |
945 @Override |
949 @Override |
946 protected void handleCompleted() { |
950 protected void handleCompleted() { |
947 processPendingRequests(); |
951 processPendingRequests(); |
948 fireUpdateBreakpointsStatus(eventBPs, BreakpointEventType.REMOVED); |
952 fireUpdateBreakpointsStatus(eventBPs, BreakpointEventType.REMOVED); |
949 super.handleCompleted(); |
953 if (rm != null) |
|
954 // don't call this if "rm" is null as this will |
|
955 // log errors if any and pack Eclipse error |
|
956 // log view with errors useless to user. |
|
957 super.handleCompleted(); |
950 } |
958 } |
951 }; |
959 }; |
952 int processPendingCountingRmCount = 0; |
960 int processPendingCountingRmCount = 0; |
953 |
961 |
954 for (final IBreakpoint breakpoint : bpCandidates) { |
962 for (final IBreakpoint breakpoint : bpCandidates) { |