void (AnnotationHolder holder, GrMethod method) { if (!method.hasModifierProperty(PsiModifier.ABSTRACT)) return; if (!(method.getContainingClass() instanceof GrInterfaceDefinition)) return; for (GrParameter parameter : method.getParameters()) { GrExpression initializerGroovy = parameter.getInitializerGroovy(); if (initializerGroovy != null) { PsiElement assignOperator = parameter.getNameIdentifierGroovy(); TextRange textRange = new TextRange(assignOperator.getTextRange().getEndOffset(), initializerGroovy.getTextRange().getEndOffset()); holder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("default.initializers.are.not.allowed.in.abstract.method")).range(textRange).create(); } } }