DebuggerContextImpl getFrameDebuggerContext() {
   DebuggerManagerThreadImpl.assertIsManagerThread();
   DebuggerContextImpl context = myDebugProcess.getDebuggerContext();
   if (context.getFrameProxy() != getStackFrameProxy()) {
     SuspendContextImpl threadSuspendContext =
         SuspendManagerUtil.getSuspendContextForThread(
             context.getSuspendContext(), getStackFrameProxy().threadProxy());
     context =
         DebuggerContextImpl.createDebuggerContext(
             myDebugProcess.mySession,
             threadSuspendContext,
             getStackFrameProxy().threadProxy(),
             getStackFrameProxy());
     context.setPositionCache(myDescriptor.getSourcePosition());
     context.initCaches();
   }
   return context;
 }
Beispiel #2
0
  @NotNull
  public static List<Pair<Breakpoint, Event>> getEventDescriptors(
      SuspendContextImpl suspendContext) {
    DebuggerManagerThreadImpl.assertIsManagerThread();
    if (suspendContext == null) {
      return Collections.emptyList();
    }
    final EventSet events = suspendContext.getEventSet();
    if (events == null) {
      return Collections.emptyList();
    }
    final List<Pair<Breakpoint, Event>> eventDescriptors = new SmartList<Pair<Breakpoint, Event>>();

    final RequestManagerImpl requestManager = suspendContext.getDebugProcess().getRequestsManager();
    for (final Event event : events) {
      final Requestor requestor = requestManager.findRequestor(event.request());
      if (requestor instanceof Breakpoint) {
        eventDescriptors.add(Pair.create((Breakpoint) requestor, event));
      }
    }
    return eventDescriptors;
  }