void (@NotNull final EditorMouseEvent e) { final Editor editor = e.getEditor(); final MouseEvent mouseEvent = e.getMouseEvent(); if (mouseEvent.isPopupTrigger() || mouseEvent.isMetaDown() || mouseEvent.isControlDown() || mouseEvent.getButton() != MouseEvent.BUTTON1 || DiffUtil.isDiffEditor(editor) || !isInsideClickableGutterArea(e, editor) || ConsoleViewUtil.isConsoleViewEditor(editor) || !isFromMyProject(editor) || (editor.getSelectionModel().hasSelection() && myDragDetected) ) { return; } final Document document = editor.getDocument(); PsiDocumentManager.getInstance(myProject).commitDocument(document); final int line = EditorUtil.yToLogicalLineNoCustomRenderers(editor, mouseEvent.getY()); final VirtualFile file = FileDocumentManager.getInstance().getFile(document); if (line >= 0 && line < document.getLineCount() && file != null) { AnAction action = ActionManager.getInstance().getAction(IdeActions.ACTION_TOGGLE_LINE_BREAKPOINT); if (action == null) throw new AssertionError("'" + IdeActions.ACTION_TOGGLE_LINE_BREAKPOINT + "' action not found"); DataContext dataContext = SimpleDataContext.getSimpleContext(BREAKPOINT_LINE_KEY, line, DataManager.getInstance().getDataContext(mouseEvent.getComponent())); AnActionEvent event = AnActionEvent.createFromAnAction(action, mouseEvent, ActionPlaces.EDITOR_GUTTER, dataContext); ActionUtil.performActionDumbAwareWithCallbacks(action, event); } }