void (PsiMember refMember, @NotNull PsiElement newContext, @Nullable PsiClass accessClass, PsiMember member, MultiMap<PsiElement, @DialogMessage String> conflicts) { PsiResolveHelper helper = JavaPsiFacade.getInstance(newContext.getProject()).getResolveHelper(); if (!helper.isAccessible(refMember, refMember.getModifierList(), newContext, accessClass, newContext)) { String message = JavaRefactoringBundle.message("0.is.1.and.will.not.be.accessible.from.2.in.the.target.class", RefactoringUIUtil.getDescription(refMember, true), VisibilityUtil.getVisibilityStringToDisplay(refMember), RefactoringUIUtil.getDescription(member, false)); message = StringUtil.capitalize(message); conflicts.putValue(refMember, message); } else if (newContext instanceof PsiClass && refMember instanceof PsiField && refMember.getContainingClass() == member.getContainingClass()) { PsiField fieldInSubClass = ((PsiClass)newContext).findFieldByName(refMember.getName(), false); if (fieldInSubClass != null && !refMember.hasModifierProperty(PsiModifier.STATIC) && fieldInSubClass != refMember && !member.hasModifierProperty(PsiModifier.STATIC)) { conflicts.putValue(refMember, StringUtil.capitalize( JavaRefactoringBundle.message("dialog.message.0.would.hide.which.1.used.by.moved.2", RefactoringUIUtil.getDescription(fieldInSubClass, true), RefactoringUIUtil.getDescription(refMember, true), RefactoringUIUtil.getDescription(member, false)))); } } }