GrTypeElement (@NotNull PsiElement at, int offset) { final GrDisjunctionTypeElement disjunction = PsiTreeUtil.getParentOfType(at, GrDisjunctionTypeElement.class); if (disjunction == null) return null; for (GrTypeElement element : disjunction.getTypeElements()) { if (element.getTextRange().contains(offset)) { return element; } } return null; }