private static Set<String> calcDevPatternClassNames(@NotNull final Project project) {
    final List<String> roots = ContainerUtil.createLockFreeCopyOnWriteList();
    JavaPsiFacade psiFacade = JavaPsiFacade.getInstance(project);
    PsiClass beanClass = psiFacade.findClass(PatternClassBean.class.getName(), GlobalSearchScope.allScope(project));
    if (beanClass != null) {
      GlobalSearchScope scope = GlobalSearchScope.getScopeRestrictedByFileTypes(GlobalSearchScope.allScope(project), StdFileTypes.XML);
      final TextOccurenceProcessor occurenceProcessor = (element, offsetInElement) -> {
        XmlTag tag = PsiTreeUtil.getParentOfType(element, XmlTag.class);
        String className = tag == null ? null : tag.getAttributeValue("className");
        if (StringUtil.isNotEmpty(className) && tag.getLocalName().endsWith("patternClass")) {
          roots.add(className);
        }
        return true;
      };
      final StringSearcher searcher = new StringSearcher("patternClass", true, true);
      CacheManager.getInstance(beanClass.getProject()).processFilesWithWord(psiFile -> {
        LowLevelSearchUtil.processElementsContainingWordInElement(occurenceProcessor, psiFile, searcher, true,
                                                                   new EmptyProgressIndicator());
        return true;
      }, searcher.getPattern(), UsageSearchContext.IN_FOREIGN_LANGUAGES, scope, searcher.isCaseSensitive());
    }
    return new HashSet<>(roots);
  }
private static Set<String> calcDevPatternClassNames(@NotNull final Project project)