private static Icon doComputeIconNow(@NotNull PsiElement element, @Iconable.IconFlags int flags) {
    if (!(element instanceof ElementBase)) {
      throw new AssertionError(element.getClass().getName() + " is not ElementBase");
    }
    Icon icon = PsiIconUtil.getIconFromProviders(element, flags);
    if (element instanceof PsiFileSystemItem) {
      VirtualFile file = PsiUtilCore.getVirtualFile(element);
      if (file != null && icon == null) {
        icon = FileIconUtil.INSTANCE.getIconFromProviders(file, flags, element.getProject());
      }
      if (file != null && icon != null) {
        icon = FileIconUtil.INSTANCE.patchIconByIconPatchers(icon, file, flags, element.getProject());
      }
      if (icon instanceof RowIcon) {
        return icon;
      }
      else if (icon != null) {
        return IconManager.getInstance().createLayeredIcon(element, icon, flags);
      }
      return ((ElementBase)element).getElementIcon(flags);
    }
    else if (icon == null) {
      return ((ElementBase)element).getElementIcon(flags);
    }
    else if (icon instanceof RowIcon) {
      return icon;
    }
    else {
      return IconManager.getInstance().createLayeredIcon(element, icon, flags);
    }
  }
private static Icon doComputeIconNow(@NotNull PsiElement element, @Iconable.IconFlags int flags)