void (AnActionEvent e, ListPopup popup) { Project project = e.getProject(); if (project != null) { popup.showCenteredInCurrentWindow(project); } else { popup.showInBestPositionFor(e.getDataContext()); } }