void (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) return; PsiFile psiFile = e.getData(CommonDataKeys.PSI_FILE); if (psiFile != null) { processFile(psiFile); } else { processDirectory(project); } }