PsiElement (@Nullable PsiElement target) { if (target instanceof ClsMethodImpl) { PsiElement mirror = ((ClsMethodImpl)target).getSourceMirrorMethod(); if (mirror != null) { return mirror.getNavigationElement(); } } if (target != null && !(target instanceof GrAccessorMethod) && target.getUserData(NAVIGATION_ELEMENT_IS_NOT_TARGET) == null) { if (target instanceof PsiMirrorElement) { return ((PsiMirrorElement)target).getPrototype(); } else { return target.getNavigationElement(); } } return target; }