}
private boolean matchesRole(IdentifierPsiElement identifierPsiElement) {
IdentifierElementType elementType = identifierPsiElement.getElementType();
IdentifierCategory role = elementType.getIdentifierCategory();
switch (identifierCategory) {
case ALL: return true;
case DEFINITION: return role == IdentifierCategory.DEFINITION || identifierPsiElement.isReferenceable();
case REFERENCE: return role == IdentifierCategory.REFERENCE;
}