int (PsiType type1, PsiType type2) { if (type1.isAssignableFrom(type2)) { return 1; } if (type2.isAssignableFrom(type1)) { return -1; } final String canonicalText1 = type1.getCanonicalText(); return canonicalText1.compareTo(type2.getCanonicalText()); }