int (PsiMember o1, PsiMember o2) { PsiClass c1 = o1.getContainingClass(); PsiClass c2 = o2.getContainingClass(); return c1.equals(c2) ? o2.getName().compareTo(o1.getName()) : c1.isInheritor(c2, true) ? 1 : -1; }