@Override
  public boolean processDeclarations(@NotNull PsiScopeProcessor processor,
                                     @NotNull ResolveState state,
                                     @Nullable PsiElement lastParent,
                                     @NotNull PsiElement place) {
    if (!super.processDeclarations(processor, state, lastParent, place)) return false;

    ElementClassHint hint = processor.getHint(ElementClassHint.KEY);
    if (!ResolveUtil.shouldProcessMethods(hint) && !ResolveUtil.shouldProcessProperties(hint)) return true;

    List<PsiClass> classes = GrTraitUtil.getSelfTypeClasses(this);
    for (PsiClass clazz : classes) {
      if (!clazz.processDeclarations(processor, state, lastParent, place)) return false;
    }
    return true;
  }
@Override
  public boolean processDeclarations(@NotNull PsiScopeProcessor processor,
                                     @NotNull ResolveState state,
                                     @Nullable PsiElement lastParent,
                                     @NotNull PsiElement place)