// copied from XDebugSessionImpl processDependencies
  public void processBreakpointHit(@NotNull final Breakpoint breakpoint) {
    XDependentBreakpointManager dependentBreakpointManager =
        ((XBreakpointManagerImpl) getXBreakpointManager()).getDependentBreakpointManager();
    XBreakpoint xBreakpoint = breakpoint.myXBreakpoint;
    if (!dependentBreakpointManager.isMasterOrSlave(xBreakpoint)) {
      return;
    }
    List<XBreakpoint<?>> breakpoints = dependentBreakpointManager.getSlaveBreakpoints(xBreakpoint);
    for (final XBreakpoint<?> slaveBreakpoint : breakpoints) {
      DebuggerInvocationUtil.invokeLater(
          myProject,
          new Runnable() {
            @Override
            public void run() {
              slaveBreakpoint.setEnabled(true);
            }
          });
    }

    if (dependentBreakpointManager.getMasterBreakpoint(xBreakpoint) != null
        && !dependentBreakpointManager.isLeaveEnabled(xBreakpoint)) {
      DebuggerInvocationUtil.invokeLater(
          myProject,
          new Runnable() {
            @Override
            public void run() {
              breakpoint.setEnabled(false);
            }
          });
      // myDebuggerManager.getBreakpointManager().getLineBreakpointManager().queueBreakpointUpdate(breakpoint);
    }
  }
 private void remove(final BreakpointWithHighlighter breakpoint) {
   DebuggerInvocationUtil.invokeLater(
       myProject,
       new Runnable() {
         @Override
         public void run() {
           removeBreakpoint(breakpoint);
         }
       });
 }
 private void showHint(final SimpleColoredText text, final WatchItemDescriptor descriptor) {
   DebuggerInvocationUtil.invokeLater(
       getProject(),
       new Runnable() {
         public void run() {
           if (!isHintHidden()) {
             JComponent component;
             if (!isActiveTooltipApplicable(descriptor.getValue())) {
               component = HintUtil.createInformationLabel(text);
             } else {
               component =
                   createExpandableHintComponent(
                       text,
                       new Runnable() {
                         public void run() {
                           final DebuggerContextImpl debuggerContext =
                               DebuggerManagerEx.getInstanceEx(getProject()).getContext();
                           final DebugProcessImpl debugProcess = debuggerContext.getDebugProcess();
                           debugProcess
                               .getManagerThread()
                               .schedule(
                                   new DebuggerContextCommandImpl(debuggerContext) {
                                     public void threadAction() {
                                       descriptor.setRenderer(
                                           debugProcess.getAutoRenderer(descriptor));
                                       final InspectDebuggerTree tree = getInspectTree(descriptor);
                                       final String expressionText =
                                           ApplicationManager.getApplication()
                                               .runReadAction(
                                                   new Computable<String>() {
                                                     @Override
                                                     public String compute() {
                                                       return myCurrentExpression.getText();
                                                     }
                                                   });
                                       showTreePopup(
                                           tree,
                                           debuggerContext,
                                           expressionText,
                                           new ValueHintTreeComponent(
                                               ValueHint.this, tree, expressionText));
                                     }
                                   });
                         }
                       });
             }
             if (!showHint(component)) return;
             if (getType() == ValueHintType.MOUSE_CLICK_HINT) {
               HintUtil.createInformationLabel(text).requestFocusInWindow();
             }
           }
         }
       });
 }
 public void actionPerformed(ActionEvent e) {
   final TextWithImports text = getEditor().getText();
   doCancelAction();
   DebuggerInvocationUtil.invokeLater(
       getProject(),
       new Runnable() {
         public void run() {
           EvaluateActionHandler.showEvaluationDialog(
               getProject(), text, DebuggerSettings.EVALUATE_FRAGMENT);
         }
       });
 }
 public void showTreePopup(
     final InspectDebuggerTree tree,
     final DebuggerContextImpl debuggerContext,
     final String title,
     final AbstractValueHintTreeComponent<?> component) {
   DebuggerInvocationUtil.invokeLater(
       getProject(),
       new Runnable() {
         public void run() {
           tree.rebuild(debuggerContext);
           showTreePopup(component, tree, title);
         }
       });
 }
 /** called by BreakpointManager when destroying the breakpoint */
 @Override
 public void delete() {
   if (isVisible()) {
     final RangeHighlighter highlighter = getHighlighter();
     if (highlighter != null) {
       DebuggerInvocationUtil.invokeLater(
           getProject(),
           new Runnable() {
             @Override
             public void run() {
               highlighter.dispose();
               // we should delete it here, so gutter will not fire events to deleted breakpoint
               BreakpointWithHighlighter.super.delete();
             }
           });
     }
   }
 }