private @Nullable Icon computeIcon(@Iconable.IconFlags int flags) {
    PsiElement psiElement = (PsiElement)this;
    if (!psiElement.isValid()) return null;

    if (Registry.is("psi.deferIconLoading", true) && EDT.isCurrentThreadEdt()) {
      Icon baseIcon = LastComputedIconCache.get(psiElement, flags);
      if (baseIcon == null) {
        baseIcon = AstLoadingFilter.disallowTreeLoading(() -> computeBaseIcon(flags));
      }
      if (baseIcon == null) {
        return null;
      }
      return IconManager.getInstance().createDeferredIcon(
        baseIcon, new ElementIconRequest(psiElement, psiElement.getProject(), flags), ICON_COMPUTE);
    }

    return computeIconNow(psiElement, flags);
  }
private @Nullable Icon computeIcon(@Iconable.IconFlags int flags)