PsiElement () { for (ClsCustomNavigationPolicy navigationPolicy : ClsCustomNavigationPolicy.EP_NAME.getExtensionList()) { try { @SuppressWarnings({"deprecation", "ScheduledForRemoval"}) PsiElement navigationElement = navigationPolicy instanceof ClsCustomNavigationPolicyEx ? ((ClsCustomNavigationPolicyEx)navigationPolicy).getFileNavigationElement(this) : navigationPolicy.getNavigationElement(this); if (navigationElement != null) return navigationElement; } catch (IndexNotReadyException ignore) { } } return CachedValuesManager.getCachedValue(this, () -> { PsiElement target = JavaPsiImplementationHelper.getInstance(getProject()).getClsFileNavigationElement(this); ModificationTracker tracker = FileIndexFacade.getInstance(getProject()).getRootModificationTracker(); return CachedValueProvider.Result.create(target, this, target.getContainingFile(), tracker); }); }