public static boolean processChildren(@NotNull PsiElement element,
                                 @NotNull PsiScopeProcessor processor,
                                 @NotNull ResolveState substitutor,
                                 @Nullable PsiElement lastParent,
                                 @NotNull PsiElement place) {
    PsiElement[] children = element.getChildren();
    if (children.length == 0) return true;
    TextRange placeTextRange = place.getTextRange();
    for (int i = children.length - 1; i >= 0; i--) {
      PsiElement child = children[i];
      if (violateRestrictions(element)) continue;
      if (violateTextRangeRestrictions(child.getTextRange(), placeTextRange)) continue;
      if (!child.processDeclarations(processor, substitutor, element, place)) return false;
    }
    return true;
  }
public static boolean processChildren(@NotNull PsiElement element,
                                 @NotNull PsiScopeProcessor processor,
                                 @NotNull ResolveState substitutor,
                                 @Nullable PsiElement lastParent,
                                 @NotNull PsiElement place)