void (@NotNull GrReferenceExpression referenceExpression) { super.visitReferenceExpression(referenceExpression); GroovyResolveResult resolveResult = referenceExpression.advancedResolve(); PsiElement resolveContext = resolveResult.getCurrentFileResolveContext(); if (resolveContext != null && !(resolveContext instanceof GrImportStatement) && !PsiTreeUtil.isAncestor(declarationOwner, resolveContext, true) && !skipResult(resolveResult)) { conflicts.putValue(referenceExpression, GroovyRefactoringBundle .message("ref.0.will.not.be.resolved.outside.of.current.context", referenceExpression.getText())); } }