FIRST_PARAMETER_KIND (final GrParameterListOwner owner, final Collection<PsiElement> occurrences) { boolean thereAreNamedArguments = false; for (PsiElement occurrence : occurrences) { if (occurrence instanceof GrReferenceExpression && occurrence.getParent() instanceof GrCall call) { final GrArgumentList args = call.getArgumentList(); if (args != null && args.getNamedArguments().length > 0) { thereAreNamedArguments = true; } } if (thereAreNamedArguments) break; } if (thereAreNamedArguments) { if (firstOwnerParameterMustBeMap(owner)) { return FIRST_PARAMETER_KIND.MUST_BE_MAP; } return FIRST_PARAMETER_KIND.ERROR; } return FIRST_PARAMETER_KIND.IS_NOT_MAP; }