private PsiElement getElement() {
    PsiElement element = myPointer.getElement();
    if (element != null && element.isValid()) {
      PsiElement navigationElement = element.getNavigationElement();
      return navigationElement != null ? navigationElement : element;
    }

    return null;
  }
private PsiElement getElement()