PsiJavaCodeReferenceElement () { ClsElementImpl child = myChild.getValue(); if (child instanceof ClsTypeElementImpl) { return ((ClsTypeElementImpl)child).getInnermostComponentReferenceElement(); } else { return (PsiJavaCodeReferenceElement) child; } }