void (PsiMember member) { ((GrMember)member).accept(myExplicitSuperDeleter); ((GrMember)member).accept(myThisSuperAdjuster); GroovyChangeContextUtil.decodeContextInfo(member, null, null); ((GroovyPsiElement)member).accept(new GroovyRecursiveElementVisitor() { @Override public void visitReferenceExpression(@NotNull GrReferenceExpression referenceExpression) { if (processRef(referenceExpression)) return; super.visitReferenceExpression(referenceExpression); } @Override public void visitCodeReferenceElement(@NotNull GrCodeReferenceElement refElement) { if (processRef(refElement)) return; super.visitCodeReferenceElement(refElement); } private static boolean processRef(@NotNull GrReferenceElement<? extends GroovyPsiElement> refElement) { final PsiElement qualifier = refElement.getQualifier(); if (qualifier != null) { final Boolean preserveQualifier = qualifier.getCopyableUserData(PRESERVE_QUALIFIER); if (preserveQualifier != null && !preserveQualifier) { refElement.setQualifier(null); return true; } } return false; } }); }