private static String formatMember(@NotNull PsiMember member) {
    if (member instanceof PsiMethod) {
      return PsiFormatUtil.formatMethod(
        (PsiMethod)member,
        PsiSubstitutor.EMPTY, PsiFormatUtilBase.SHOW_NAME | PsiFormatUtilBase.SHOW_PARAMETERS,
        PsiFormatUtilBase.SHOW_TYPE
      );
    } else if (member instanceof PsiField){
      return PsiFormatUtil.formatVariable(
        (PsiField)member,
        PsiFormatUtilBase.SHOW_NAME | PsiFormatUtilBase.SHOW_TYPE,
        PsiSubstitutor.EMPTY
      );
    }
    else {
      return PsiFormatUtil.formatClass((PsiClass)member, PsiFormatUtilBase.SHOW_NAME);
    }
  }
private static String formatMember(@NotNull PsiMember member)