BaseInspectionVisitor () { return new BaseInspectionVisitor() { @Override public void visitMethodCall(@NotNull GrMethodCall methodCall) { if (isFake(methodCall)) return; if (JavaStylePropertiesUtil.isPropertyAccessor(methodCall)) { final String message = GroovyBundle.message("java.style.property.access"); final GrExpression expression = methodCall.getInvokedExpression(); if (expression instanceof GrReferenceExpression ref) { PsiElement referenceNameElement = ref.getReferenceNameElement(); registerError(referenceNameElement, message, myFixes, ProblemHighlightType.GENERIC_ERROR_OR_WARNING); } } } }; }