boolean (@NotNull final PsiElement element) { GrParameter parameter = null; if (element instanceof GrParameter) { parameter = (GrParameter)element; } else if (element instanceof GrReferenceExpression expr) { if (expr.getQualifierExpression() != null) return false; final PsiElement resolved = expr.resolve(); if (resolved instanceof GrParameter) { parameter = (GrParameter)resolved; } } if (parameter == null) return false; if (parameter.isOptional()) return false; GrParameterListOwner owner = PsiTreeUtil.getParentOfType(element, GrParameterListOwner.class); return owner != null && checkForMapParameters(owner); }