@Override
    public void mouseClicked(final EditorMouseEvent e) {
      final Editor editor = e.getEditor();
      final MouseEvent mouseEvent = e.getMouseEvent();
      if (mouseEvent.isPopupTrigger()
          || mouseEvent.isMetaDown()
          || mouseEvent.isControlDown()
          || mouseEvent.getButton() != MouseEvent.BUTTON1
          || MarkupEditorFilterFactory.createIsDiffFilter().avaliableIn(editor)
          || e.getArea() != EditorMouseEventArea.LINE_MARKERS_AREA
          || ConsoleViewUtil.isConsoleViewEditor(editor)
          || !isFromMyProject(editor)) {
        return;
      }

      PsiDocumentManager.getInstance(myProject)
          .commitAndRunReadAction(
              new Runnable() {
                @Override
                public void run() {
                  final int line = EditorUtil.yPositionToLogicalLine(editor, mouseEvent);
                  final Document document = editor.getDocument();
                  final VirtualFile file = FileDocumentManager.getInstance().getFile(document);
                  if (line >= 0 && line < document.getLineCount() && file != null) {
                    ApplicationManager.getApplication()
                        .invokeLater(
                            new Runnable() {
                              @Override
                              public void run() {
                                if (!myProject.isDisposed()
                                    && myProject.isInitialized()
                                    && file.isValid()) {
                                  ActionManagerEx.getInstanceEx()
                                      .fireBeforeActionPerformed(
                                          "ToggleLineBreakpoint", e.getMouseEvent());

                                  XLineBreakpoint breakpoint =
                                      XBreakpointUtil.toggleLineBreakpoint(
                                          myProject,
                                          file,
                                          editor,
                                          line,
                                          mouseEvent.isAltDown(),
                                          false);
                                  if (!mouseEvent.isAltDown()
                                      && mouseEvent.isShiftDown()
                                      && breakpoint != null) {
                                    breakpoint.setSuspendPolicy(SuspendPolicy.NONE);
                                    String selection = editor.getSelectionModel().getSelectedText();
                                    if (selection != null) {
                                      breakpoint.setLogExpression(selection);
                                    } else {
                                      breakpoint.setLogMessage(true);
                                    }
                                    // edit breakpoint
                                    DebuggerUIUtil.showXBreakpointEditorBalloon(
                                        myProject,
                                        mouseEvent.getPoint(),
                                        ((EditorEx) editor).getGutterComponentEx(),
                                        false,
                                        breakpoint);
                                  }
                                }
                              }
                            });
                  }
                }
              });
    }