EditorMouseEvent (@NotNull MouseEvent e) { Point point = e.getPoint(); EditorMouseEventArea area = getMouseEventArea(e); boolean inEditingArea = area == EditorMouseEventArea.EDITING_AREA; EditorLocation location = new EditorLocation(this, inEditingArea ? point : new Point(0, point.y)); VisualPosition visualPosition = location.getVisualPosition(); LogicalPosition logicalPosition = location.getLogicalPosition(); int offset = location.getOffset(); int relX = point.x - myEditorComponent.getInsets().left; Inlay<?> inlayCandidate = inEditingArea ? myInlayModel.getElementAt(location, true) : null; Inlay<?> inlay = inlayCandidate == null || (inlayCandidate.getPlacement() == Inlay.Placement.BELOW_LINE || inlayCandidate.getPlacement() == Inlay.Placement.ABOVE_LINE) && inlayCandidate.getWidthInPixels() <= relX ? null : inlayCandidate; FoldRegion foldRegionCandidate = inEditingArea ? myFoldingModel.getFoldingPlaceholderAt(location, true) : null; FoldRegion foldRegion = foldRegionCandidate instanceof CustomFoldRegion && ((CustomFoldRegion)foldRegionCandidate).getWidthInPixels() <= relX ? null : foldRegionCandidate; GutterIconRenderer gutterIconRenderer = inEditingArea ? null : myGutterComponent.getGutterRenderer(point); boolean overText = inlayCandidate == null && (foldRegionCandidate == null || foldRegion != null) && offsetToLogicalPosition(offset).equals(logicalPosition); return new EditorMouseEvent(this, e, area, offset, logicalPosition, visualPosition, overText, foldRegion, inlay, gutterIconRenderer); }