PsiElement () { for (ClsCustomNavigationPolicy navigationPolicy : ClsCustomNavigationPolicy.EP_NAME.getExtensionList()) { try { PsiElement navigationElement = navigationPolicy.getNavigationElement(this); if (navigationElement != null) return navigationElement; } catch (IndexNotReadyException ignored) { } } try { PsiClass aClass = getSourceMirrorClass(); if (aClass != null) return aClass.getNavigationElement(); if ("package-info".equals(getName())) { PsiElement parent = getParent(); if (parent instanceof ClsFileImpl) { PsiElement sourceFile = parent.getNavigationElement(); if (sourceFile instanceof PsiJavaFile) { return sourceFile; } } } } catch (IndexNotReadyException ignore) { } return this; }