void (@NotNull PsiMember member, @PsiModifier.ModifierConstant @Nullable String newVisibility, @Nullable PsiClass targetClass, @NotNull Set<? extends PsiMember> membersToMove, @NotNull MultiMap<PsiElement, @DialogMessage String> conflicts, @NotNull Condition<? super PsiReference> ignorePredicate) { PsiModifierList modifierListCopy = member.getModifierList(); if (modifierListCopy != null) { modifierListCopy = (PsiModifierList)modifierListCopy.copy(); final PsiClass containingClass = member.getContainingClass(); if (containingClass != null && containingClass.isInterface()) { VisibilityUtil.setVisibility(modifierListCopy, PsiModifier.PUBLIC); } } if (newVisibility != null && modifierListCopy != null) { try { VisibilityUtil.setVisibility(modifierListCopy, newVisibility); } catch (IncorrectOperationException ignore) { } // do nothing and hope for the best } checkAccessibilityConflictsAfterMove(member, modifierListCopy, targetClass, membersToMove, conflicts, ignorePredicate); }