int (PsiField f1, PsiField f2) { if (f1.getType() instanceof PsiPrimitiveType && !(f2.getType() instanceof PsiPrimitiveType)) return -1; if (!(f1.getType() instanceof PsiPrimitiveType) && f2.getType() instanceof PsiPrimitiveType) return 1; return PsiUtilCore.compareElementsByPosition(f1, f2); }