void (AnnotationHolder holder, GrMethod method) { final PsiTypeParameterList parameterList = method.getTypeParameterList(); if (parameterList != null) { final GrTypeElement typeElement = method.getReturnTypeElementGroovy(); if (typeElement == null) { final TextRange parameterListTextRange = parameterList.getTextRange(); final TextRange range = new TextRange(parameterListTextRange.getEndOffset(), parameterListTextRange.getEndOffset() + 1); holder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("method.with.type.parameters.should.have.return.type")).range(range).create(); } } }