private static boolean processRootsByClassNames(@NotNull PsiFile file, @Nullable String type, @NotNull Processor<? super PsiElement> processor) {
    Project project = file.getProject();
    Set<String> classNames = collectDevPatternClassNames(project);
    if (!classNames.isEmpty()) {
      JavaPsiFacade psiFacade = JavaPsiFacade.getInstance(project);
      for (String className : classNames) {
        PsiClass patternClass = psiFacade.findClass(className, GlobalSearchScope.allScope(project));
        if (patternClass != null && !processor.process(patternClass)) return false;
      }
    }
    Class[] classes = StringUtil.isEmpty(type) ? ArrayUtil.EMPTY_CLASS_ARRAY : PatternCompilerFactory.getFactory().getPatternClasses(type);
    return classes.length == 0 || processor.process(getRootByClasses(file, classes));
  }
private static boolean processRootsByClassNames(@NotNull PsiFile file, @Nullable String type, @NotNull Processor<? super PsiElement> processor)