コード例 #1
0
  private Icon calcIcon(@Nullable DebugProcessImpl debugProcess) {
    final boolean muted = debugProcess != null && isMuted(debugProcess);
    if (!isEnabled()) {
      return getDisabledIcon(muted);
    }

    myInvalidMessage = "";

    if (!isValid()) {
      return getInvalidIcon(muted);
    }

    if (debugProcess == null) {
      return getSetIcon(muted);
    }

    final RequestManagerImpl requestsManager = debugProcess.getRequestsManager();

    final boolean isVerified = myCachedVerifiedState || requestsManager.isVerified(this);

    final String warning = requestsManager.getWarning(this);
    if (warning != null) {
      myInvalidMessage = warning;
      if (!isVerified) {
        return getInvalidIcon(muted);
      }
      return getVerifiedWarningsIcon(muted);
    }

    if (isVerified) {
      return getVerifiedIcon(muted);
    }

    return getSetIcon(muted);
  }
コード例 #2
0
 // interaction with RequestManagerImpl
 public void disableBreakpoints(@NotNull final DebugProcessImpl debugProcess) {
   final List<Breakpoint> breakpoints = getBreakpoints();
   if (!breakpoints.isEmpty()) {
     final RequestManagerImpl requestManager = debugProcess.getRequestsManager();
     for (Breakpoint breakpoint : breakpoints) {
       breakpoint.markVerified(requestManager.isVerified(breakpoint));
       requestManager.deleteRequest(breakpoint);
     }
     SwingUtilities.invokeLater(
         new Runnable() {
           @Override
           public void run() {
             updateBreakpointsUI();
           }
         });
   }
 }