public static void escalateVisibility(PsiMember modifierListOwner, PsiElement place) throws IncorrectOperationException {
    final String visibilityModifier = getVisibilityModifier(modifierListOwner.getModifierList());
    PsiElement fileResolveScope = null;
    if (place instanceof PsiJavaReference) {
      fileResolveScope = ((PsiJavaReference)place).advancedResolve(false).getCurrentFileResolveScope();
    } else if (place instanceof PsiCall) {
      fileResolveScope = ((PsiCall)place).resolveMethodGenerics().getCurrentFileResolveScope();
    }
    PsiResolveHelper psiResolveHelper = PsiResolveHelper.getInstance(place.getProject());
    for (int index = ArrayUtil.indexOf(visibilityModifiers, visibilityModifier);
         index < visibilityModifiers.length &&
         !psiResolveHelper.isAccessible(modifierListOwner, modifierListOwner.getModifierList(), place, null, fileResolveScope);
         index++) {
      @PsiModifier.ModifierConstant String modifier = visibilityModifiers[index];
      PsiUtil.setModifierProperty(modifierListOwner, modifier, true);
    }
  }
public static void escalateVisibility(PsiMember modifierListOwner, PsiElement place)