void (@NotNull AnActionEvent e) { int x = 0; int y = 0; InputEvent inputEvent = e.getInputEvent(); if (inputEvent instanceof MouseEvent) { x = ((MouseEvent)inputEvent).getX(); y = ((MouseEvent)inputEvent).getY(); } showGearPopup(inputEvent.getComponent(), x, y); }