@Override
  public boolean processDeclarations(@NotNull PsiScopeProcessor processor,
                                     @NotNull ResolveState state,
                                     PsiElement lastParent,
                                     @NotNull PsiElement place) {
    processor.handleEvent(PsiScopeProcessor.Event.SET_DECLARATION_HOLDER, this);

    for (PsiElement element : getDeclaredElements()) {
      if (element != lastParent) {
        if (element instanceof PsiVariable && ((PsiVariable)element).isUnnamed()) continue;
        if (!processor.execute(element, state)) return false;
      }
      else {
        ElementClassHint hint = processor.getHint(ElementClassHint.KEY);
        if (lastParent instanceof PsiClass && (hint == null || hint.shouldProcess(ElementClassHint.DeclarationKind.CLASS))) {
          if (!processor.execute(lastParent, state)) return false;
        }
      }
    }

    return true;
  }
@Override
  public boolean processDeclarations(@NotNull PsiScopeProcessor processor,
                                     @NotNull ResolveState state,
                                     PsiElement lastParent,
                                     @NotNull PsiElement place)