void (@NotNull AnActionEvent e) { MouseEvent inputEvent = (MouseEvent)e.getInputEvent(); Project project = e.getRequiredData(CommonDataKeys.PROJECT); Runnable callback = e.getData(OpenInEditorAction.AFTER_NAVIGATE_CALLBACK); Component component = inputEvent.getComponent(); Point point = inputEvent.getPoint(); Component componentAt = SwingUtilities.getDeepestComponentAt(component, point.x, point.y); MouseEvent convertedEvent = SwingUtilities.convertMouseEvent(inputEvent.getComponent(), inputEvent, componentAt); Editor editor = getEditor(componentAt); assert editor != null; int line = editor.xyToLogicalPosition(convertedEvent.getPoint()).line; Navigatable navigatable = getNavigatable(editor, line); if (navigatable == null) return; OpenInEditorAction.openEditor(project, navigatable, callback); }