void (@NotNull AnActionEvent e) { Editor editor = e.getData(CommonDataKeys.EDITOR); if (editor == null) return; final PsiFile file = e.getData(CommonDataKeys.PSI_FILE); if (file == null) return; final Project project = e.getProject(); assert project != null; final VirtualFile projectDir = ProjectUtil.guessProjectDir(project); assert projectDir != null; PsiDirectory directory = PsiManager.getInstance(project).findDirectory(projectDir); assert directory != null; final Ref<PsiFile> featuresDump = new Ref<>(); calculateFeaturesForUsage(editor, file, project, featuresDump); }