boolean (@NotNull AnActionEvent e) { final Project project = getEventProject(e); final Module module = e.getData(PlatformCoreDataKeys.MODULE); if (project != null && module != null) { final VirtualFile moduleFolder = e.getData(CommonDataKeys.VIRTUAL_FILE); if (moduleFolder == null) { return false; } if (ProjectRootsUtil.isModuleContentRoot(moduleFolder, project) || ProjectRootsUtil.isModuleSourceRoot(moduleFolder, project)) { return true; } } return false; }