Set<String> (@NotNull Project project) { return CachedValuesManager.getManager(project).getCachedValue(project, () -> { Set<String> result = new HashSet<>(); GlobalSearchScope scope = GlobalSearchScope.allScope(project); for (PsiClass collector : JavaPsiFacade.getInstance(project).findClasses(GROOVY_TRANSFORM_ANNOTATION_COLLECTOR, scope)) { AnnotatedElementsSearch.searchPsiClasses(collector, scope).forEach(aClass -> { ContainerUtil.addIfNotNull(result, aClass.getName()); return true; }); } return CachedValueProvider.Result.create(result, PsiModificationTracker.MODIFICATION_COUNT); }); }