private static boolean resolvesToMacro(PsiScopeProcessor processor, ResolveState state, @NotNull PsiElement place, Project project) {
    GroovyMacroRegistryService macroService = project.getService(GroovyMacroRegistryService.class);
    NameHint nameHint = processor.getHint(NameHint.KEY);
    String name = nameHint == null ? null : nameHint.getName(state);
    if (name == null) {
      return true;
    }

    Collection<PsiMethod> macros = macroService.getAllKnownMacros(place);
    for (PsiMethod macro : macros) {
      if (!processor.execute(GdkMethodUtil.createMacroMethod(macro), state)) {
        return false;
      }
    }
    return true;
  }
private static boolean resolvesToMacro(PsiScopeProcessor processor, ResolveState state, @NotNull PsiElement place, Project project)