void (@NotNull AnActionEvent e) { ListPopup popup = createPopup(e.getDataContext()); Project project = e.getData(CommonDataKeys.PROJECT); if (project != null) { popup.showCenteredInCurrentWindow(project); } else { popup.showInBestPositionFor(e.getDataContext()); } }