private static Runnable addStaticMembers(CompletionParameters parameters,
                                       final PrefixMatcher matcher,
                                       final Map<PsiModifierListOwner, LookupElement> staticMembers, final Consumer<? super LookupElement> consumer) {
    final StaticMemberProcessor processor = completeStaticMembers(parameters);
    processor.processMembersOfRegisteredClasses(matcher::prefixMatches, (member, psiClass) -> {
      if (member instanceof GrAccessorMethod) {
        member = ((GrAccessorMethod)member).getProperty();
      }
      member = CompletionUtil.getOriginalOrSelf(member);
      if (staticMembers.containsKey(member)) {
        return;
      }
      final String name = member.getName();
      if (name == null || !matcher.prefixMatches(name)) {
        staticMembers.remove(member);
        return;
      }
      JavaGlobalMemberLookupElement element = createGlobalMemberElement(member, psiClass, true);
      staticMembers.put(member, element);
      consumer.consume(element);
    });
    if (parameters.getInvocationCount() >= 2 && StringUtil.isNotEmpty(matcher.getPrefix())) {
      return () -> processor.processStaticMethodsGlobally(matcher, element -> {
        PsiMember member = (PsiMember)element.getObject();
        if (member instanceof GrAccessorMethod) {
          member = ((GrAccessorMethod)member).getProperty();
        }
        member = CompletionUtil.getOriginalOrSelf(member);
        if (staticMembers.containsKey(member)) {
          return;
        }
        staticMembers.put(member, element);
        consumer.consume(element);
      });
    }
    return EmptyRunnable.INSTANCE;
  }
private static Runnable addStaticMembers(CompletionParameters parameters,
                                       final PrefixMatcher matcher,
                                       final Map<PsiModifierListOwner, LookupElement> staticMembers, final Consumer<? super LookupElement> consumer)