int (PsiMember member1, PsiMember member2) { final String name1 = member1.getName(); if (name1 == null) { return -1; } final String name2 = member2.getName(); if (name2 == null) { return 1; } final int i = name1.compareTo(name2); if (i != 0) { return i; } final PsiJavaFile file1 = (PsiJavaFile)member1.getContainingFile(); final PsiJavaFile file2 = (PsiJavaFile)member2.getContainingFile(); final String packageName1 = file1.getPackageName(); final String packageName2 = file2.getPackageName(); return packageName1.compareTo(packageName2); }