void (@NotNull AnActionEvent e) { MouseEvent mouseEvent = ObjectUtils.tryCast(e.getInputEvent(), MouseEvent.class); if (mouseEvent == null || mouseEvent.getButton() == MouseEvent.BUTTON1) { handleMouseClick(); } }