void (@NotNull MouseEvent e) { EditorMouseEvent event = createEditorMouseEvent(e); myLastPressWasAtBlockInlay = false; myLastMousePressedLocation = event.getLogicalPosition(); myLastMousePressedPoint = new RelativePoint(event.getMouseEvent()).getPoint(myEditorComponent); myCaretStateBeforeLastPress = isToggleCaretEvent(e) ? myCaretModel.getCaretsAndSelections() : Collections.emptyList(); myCurrentDragIsSubstantial = false; myDragStarted = false; myForcePushHappened = false; clearDnDContext(); myMousePressedEvent = e; myExpectedCaretOffset = event.getOffset(); try { for (EditorMouseListener mouseListener : myMouseListeners) { mouseListener.mousePressed(event); if (isReleased) return; } } finally { myExpectedCaretOffset = -1; } if (composedTextExists()) { InputContext inputContext = myEditorComponent.getInputContext(); if (inputContext != null) { inputContext.endComposition(); } } if (event.getArea() == EditorMouseEventArea.LINE_MARKERS_AREA || event.getArea() == EditorMouseEventArea.FOLDING_OUTLINE_AREA && !isInsideGutterWhitespaceArea(e)) { myDragOnGutterSelectionStartLine = EditorUtil.yPositionToLogicalLine(EditorImpl.this, e); } if (event.isConsumed()) return; if (myCommandProcessor != null) { Runnable runnable = () -> { if (processMousePressed(e) && myProject != null && !myProject.isDefault()) { IdeDocumentHistory.getInstance(myProject).includeCurrentCommandAsNavigation(); } }; myCommandProcessor .executeCommand(myProject, runnable, "", DocCommandGroupId.noneGroupId(getDocument()), UndoConfirmationPolicy.DEFAULT, getDocument()); } else { processMousePressed(e); } invokePopupIfNeeded(event); }