boolean (PsiReferenceList list, PsiReferenceList.Role role) { if (role == PsiReferenceList.Role.EXTENDS_LIST) { PsiElement parent = list.getParent(); return parent instanceof PsiClass && ((PsiClass)parent).isInterface(); } if (role == PsiReferenceList.Role.IMPLEMENTS_LIST) { return true; } return false; }