@Override
  public void createRequest(@NotNull DebugProcessImpl debugProcess) {
    DebuggerManagerThreadImpl.assertIsManagerThread();
    // check is this breakpoint is enabled, vm reference is valid and there're no requests created
    // yet
    if (!isEnabled()
        || !debugProcess.isAttached()
        || isMuted(debugProcess)
        || !debugProcess.getRequestsManager().findRequests(this).isEmpty()) {
      return;
    }

    if (!isValid()) {
      return;
    }

    SourcePosition position = getSourcePosition();
    if (position != null) {
      createOrWaitPrepare(debugProcess, position);
    } else {
      LOG.error(
          "Unable to create request for breakpoint with null position: "
              + getDisplayName()
              + " at "
              + myXBreakpoint.getSourcePosition());
    }
    updateUI();
  }
 @Override
 public void processClassPrepare(final DebugProcess debugProcess, final ReferenceType classType) {
   if (!isEnabled() || !isValid()) {
     return;
   }
   createRequestForPreparedClass((DebugProcessImpl) debugProcess, classType);
   updateUI();
 }
  @Nullable
  public BreakpointWithHighlighter init() {
    if (!isValid()) {
      return null;
    }

    if (!ApplicationManager.getApplication().isUnitTestMode()) {
      updateUI();
      updateGutter();
    }

    return this;
  }
  @Nullable
  public BreakpointWithHighlighter init() {
    if (!isValid()) {
      final RangeHighlighter highlighter = myHighlighter;
      if (highlighter != null) {
        highlighter.dispose();
      }
      return null;
    }

    if (!ApplicationManager.getApplication().isUnitTestMode()) {
      updateUI();
      updateGutter();
    }

    return this;
  }
  @Override
  public void createRequest(@NotNull DebugProcessImpl debugProcess) {
    DebuggerManagerThreadImpl.assertIsManagerThread();
    // check is this breakpoint is enabled, vm reference is valid and there're no requests created
    // yet
    if (!isEnabled()
        || !debugProcess.isAttached()
        || isMuted(debugProcess)
        || !debugProcess.getRequestsManager().findRequests(this).isEmpty()) {
      return;
    }

    if (!isValid()) {
      return;
    }

    createOrWaitPrepare(debugProcess, getSourcePosition());
    updateUI();
  }
  public boolean moveTo(@NotNull SourcePosition position) {
    if (!canMoveTo(position)) {
      return false;
    }
    final PsiFile psiFile = position.getFile();
    final PsiFile oldFile = getSourcePosition().getFile();
    final Document document = PsiDocumentManager.getInstance(getProject()).getDocument(psiFile);
    final Document oldDocument = PsiDocumentManager.getInstance(getProject()).getDocument(oldFile);
    if (document == null || oldDocument == null) {
      return false;
    }
    final RangeHighlighter newHighlighter =
        createHighlighter(myProject, document, position.getLine());
    if (newHighlighter == null) {
      return false;
    }
    final RangeHighlighter oldHighlighter = myHighlighter;
    myHighlighter = newHighlighter;

    reload();

    if (!isValid()) {
      myHighlighter.dispose();
      myHighlighter = oldHighlighter;
      reload();
      return false;
    }

    if (oldHighlighter != null) {
      oldHighlighter.dispose();
    }

    DebuggerManagerEx.getInstanceEx(getProject())
        .getBreakpointManager()
        .fireBreakpointChanged(this);
    updateUI();

    return true;
  }