void (final Map<String, Collection<String>> results, PsiMethod[] psiMethods, PsiClass... classes) { final Set<String> test = new HashSet<>(1); test.add(TEST_ANNOTATION_FQN); ContainerUtil.addAll(test, CONFIG_ANNOTATIONS_FQN); if (psiMethods != null) { for (final PsiMethod psiMethod : psiMethods) { ApplicationManager.getApplication().runReadAction( () -> appendAnnotationAttributeValues(results, AnnotationUtil.findAnnotation(psiMethod, test), psiMethod) ); } } else { for (final PsiClass psiClass : classes) { ApplicationManager.getApplication().runReadAction(() -> { if (psiClass != null && hasTest(psiClass)) { appendAnnotationAttributeValues(results, AnnotationUtil.findAnnotation(psiClass, test), psiClass); PsiMethod[] methods = psiClass.getMethods(); for (PsiMethod method : methods) { if (method != null) { appendAnnotationAttributeValues(results, AnnotationUtil.findAnnotation(method, test), method); } } } }); } } }